00001
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include "GuiLevel.h"
00027 #include "panodata/StandardImageVariableGroups.h"
00028
00029 GuiLevel GetMinimumGuiLevel(HuginBase::PanoramaData& pano)
00030 {
00031 if(pano.getNrOfImages()>0)
00032 {
00033 for(size_t i=0;i<pano.getNrOfImages();i++)
00034 {
00035 const HuginBase::SrcPanoImage& img=pano.getImage(i);
00036 if(img.getX()!=0 || img.getY()!=0 || img.getZ()!=0 || img.getShear().squareLength()>0)
00037 {
00038 return GUI_EXPERT;
00039 };
00040 }
00041 HuginBase::StandardImageVariableGroups variable_group(pano);
00042 if(variable_group.getStacks().getNumberOfParts()<pano.getNrOfImages())
00043 {
00044 return GUI_ADVANCED;
00045 };
00046 for(size_t i=0;i<pano.getNrOfImages();i++)
00047 {
00048 const HuginBase::SrcPanoImage& img=pano.getImage(i);
00049 if(img.getRadialVigCorrCenterShift().squareLength()>0)
00050 {
00051 return GUI_ADVANCED;
00052 };
00053 HuginBase::MaskPolygonVector masks=img.getMasks();
00054 for(size_t j=0; j<masks.size(); j++)
00055 {
00056 if(masks[j].getMaskType()==HuginBase::MaskPolygon::Mask_Stack_negative ||
00057 masks[j].getMaskType()==HuginBase::MaskPolygon::Mask_Stack_positive)
00058 {
00059 return GUI_ADVANCED;
00060 };
00061 };
00062 };
00063 };
00064 return GUI_SIMPLE;
00065 };