26 #include "hugin_config.h"
45 #include <wx/renderer.h>
89 void SetImgNr(
long newImgNr) { m_nr=newImgNr;};
91 const bool IsGroup()
const {
return (m_nr<0); };
114 const wxString& name)
117 if (! wxTreeListCtrl::Create(parent,
id, pos, size, style | wxTR_DEFAULT_STYLE|wxTR_HIDE_ROOT|wxTR_NO_LINES|wxTR_FULL_ROW_HIGHLIGHT|wxTR_ROW_LINES|wxTR_LINES_AT_ROOT|wxTR_MULTIPLE) )
126 m_degDigits = wxConfigBase::Get()->Read(wxT(
"/General/DegreeFractionalDigits"),1);
127 m_pixelDigits = wxConfigBase::Get()->Read(wxT(
"/General/PixelFractionalDigits"),1);
128 m_distDigits = wxConfigBase::Get()->Read(wxT(
"/General/DistortionFractionalDigits"),3);
137 #define ADDCOLUMN(header, mapName, width, align, isEditable, IVE, tooltip) \
138 AddColumn(header, width, align, -1, true, false, tooltip);\
139 m_columnMap[mapName]=counter;\
140 m_columnVector.push_back(mapName);\
143 m_editableColumns.insert(counter);\
145 m_variableVector.push_back(IVE);\
147 ADDCOLUMN(wxT(
"#"),
"imgNr", 35, wxALIGN_LEFT,
false, HuginBase::ImageVariableGroup::IVE_Filename, _(
"Image number"))
148 ADDCOLUMN(_(
"Filename"),
"filename", 200, wxALIGN_LEFT,
false, HuginBase::ImageVariableGroup::IVE_Filename, _(
"Filename"))
149 ADDCOLUMN(_(
"Width"),
"width", 60, wxALIGN_RIGHT,
false, HuginBase::ImageVariableGroup::IVE_Filename, _(
"Image width"))
150 ADDCOLUMN(_(
"Height"),
"height", 60, wxALIGN_RIGHT,
false, HuginBase::ImageVariableGroup::IVE_Filename, _(
"Image height"))
151 ADDCOLUMN(_(
"Anchor"),
"anchor", 60, wxALIGN_RIGHT,
false, HuginBase::ImageVariableGroup::IVE_Filename, _(
"Anchor image for position and/or exposure"))
152 ADDCOLUMN(_(
"# Ctrl Pnts"),
"cps", 60, wxALIGN_RIGHT,
false, HuginBase::ImageVariableGroup::IVE_Filename, _(
"Number of control points in this image"))
153 ADDCOLUMN(_(
"Lens no."),
"lensNr", 60, wxALIGN_RIGHT,
false, HuginBase::ImageVariableGroup::IVE_Filename, _(
"Assigned lens number"))
154 ADDCOLUMN(_(
"Stack no."),
"stackNr", 60, wxALIGN_RIGHT,
false, HuginBase::ImageVariableGroup::IVE_Filename, _(
"Assigned stack number"))
156 ADDCOLUMN(_(
"Maker"),
"maker", 100, wxALIGN_LEFT,
false, HuginBase::ImageVariableGroup::IVE_Filename, _(
"Camera maker"))
157 ADDCOLUMN(_(
"Model"),
"model", 100, wxALIGN_LEFT,
false, HuginBase::ImageVariableGroup::IVE_Filename, _(
"Camera model"))
158 ADDCOLUMN(_(
"Lens"),
"lens", 100, wxALIGN_LEFT,
false, HuginBase::ImageVariableGroup::IVE_Filename, _(
"Used lens"))
159 ADDCOLUMN(_(
"Capture date"),
"date", 100, wxALIGN_LEFT,
false, HuginBase::ImageVariableGroup::IVE_Filename, _(
"Date, image was taken"))
160 ADDCOLUMN(_(
"Focal length"),
"focallength", 80, wxALIGN_LEFT,
false, HuginBase::ImageVariableGroup::IVE_Filename, _(
"Focal length"))
161 ADDCOLUMN(_(
"Aperture"),
"aperture", 50, wxALIGN_LEFT,
false, HuginBase::ImageVariableGroup::IVE_Filename, _(
"Aperture"))
162 ADDCOLUMN(_(
"Shutter Speed"),
"time", 50, wxALIGN_LEFT,
false, HuginBase::ImageVariableGroup::IVE_Filename, _(
"Shutter speed"))
163 ADDCOLUMN(_(
"ISO"),
"iso", 50, wxALIGN_LEFT,
false, HuginBase::ImageVariableGroup::IVE_Filename, _(
"ISO speed"))
165 ADDCOLUMN(_(
"Yaw (y)"),
"y", 60, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_Yaw, _(
"Yaw"))
166 ADDCOLUMN(_(
"Pitch (p)"),
"p", 60, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_Yaw, _(
"Pitch"))
167 ADDCOLUMN(_(
"Roll (r)"),
"r", 60, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_Yaw, _(
"Roll"))
168 ADDCOLUMN(wxT(
"X (TrX)"),
"TrX", 60, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_Yaw, _(
"Camera translation X"))
169 ADDCOLUMN(wxT(
"Y (TrY)"),
"TrY", 60, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_Yaw, _(
"Camera translation Y"))
170 ADDCOLUMN(wxT(
"Z (TrZ)"),
"TrZ", 60, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_Yaw, _(
"Camera translation Z"))
171 ADDCOLUMN(_(
"Plane yaw"),
"Tpy", 60, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_Yaw, _(
"Translation remap plane yaw"))
172 ADDCOLUMN(_(
"Plane pitch"),
"Tpp", 60, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_Yaw, _(
"Translation remap plane pitch"))
173 ADDCOLUMN(_(
"Camera translation"),
"cam_trans", 60, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_Yaw, _(
"Camera translation"))
175 ADDCOLUMN(_(
"Lens type (f)"),
"projection", 100, wxALIGN_LEFT,
false, HuginBase::ImageVariableGroup::IVE_Filename, _(
"Lens type (rectilinear, fisheye, equirectangular, ...)"))
176 ADDCOLUMN(_(
"Hfov (v)"),
"v", 80, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_HFOV, _(
"Horizontal field of view (v)"))
177 ADDCOLUMN(wxT(
"a"),
"a", 40, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_RadialDistortion, _(
"Radial distortion (a)"))
178 ADDCOLUMN(wxT(
"b"),
"b", 40, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_RadialDistortion, _(
"Radial distortion (b, barrel)"))
179 ADDCOLUMN(wxT(
"c"),
"c", 40, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_RadialDistortion, _(
"Radial distortion (c)"))
180 ADDCOLUMN(wxT(
"d"),
"d", 40, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_RadialDistortionCenterShift, _(
"Horizontal image center shift (d)"))
181 ADDCOLUMN(wxT(
"e"),
"e", 40, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_RadialDistortionCenterShift, _(
"Vertical image center shift (e)"))
182 ADDCOLUMN(wxT(
"g"),
"g", 40, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_Shear, _(
"Horizontal image shearing (g)"))
183 ADDCOLUMN(wxT(
"t"),
"t", 40, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_Shear, _(
"Vertical image shearing (t)"))
185 ADDCOLUMN(wxT(
"EV"),
"Eev", 50, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_ExposureValue, _(
"Exposure value (Eev)"))
186 ADDCOLUMN(wxT(
"Er"),
"Er", 40, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_WhiteBalanceRed, _(
"Red multiplier (Er)"))
187 ADDCOLUMN(wxT(
"Eb"),
"Eb", 40, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_WhiteBalanceBlue, _(
"Blue multiplier (Eb)"))
188 ADDCOLUMN(wxT(
"Vb"),
"Vb", 40, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_RadialVigCorrCoeff, _(
"Vignetting (Vb, Vc, Vd)"))
189 ADDCOLUMN(wxT(
"Vc"),
"Vc", 40, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_RadialVigCorrCoeff, _(
"Vignetting (Vb, Vc, Vd)"))
190 ADDCOLUMN(wxT(
"Vd"),
"Vd", 40, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_RadialVigCorrCoeff, _(
"Vignetting (Vb, Vc, Vd)"))
191 ADDCOLUMN(wxT(
"Vx"),
"Vx", 40, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_RadialVigCorrCenterShift, _(
"Horizontal vignetting center shift (Vx)"))
192 ADDCOLUMN(wxT(
"Vy"),
"Vy", 40, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_RadialVigCorrCenterShift, _(
"Vertical vignetting center shift (Vy)"))
193 ADDCOLUMN(_(
"Response type"),
"response", 80, wxALIGN_LEFT,
false, HuginBase::ImageVariableGroup::IVE_Filename, _(
"Camera response type"))
194 ADDCOLUMN(wxT(
"Ra"),
"Ra", 40, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_EMoRParams, _(
"Camera response parameter"))
195 ADDCOLUMN(wxT(
"Rb"),
"Rb", 40, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_EMoRParams, _(
"Camera response parameter"))
196 ADDCOLUMN(wxT(
"Rc"),
"Rc", 40, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_EMoRParams, _(
"Camera response parameter"))
197 ADDCOLUMN(wxT(
"Rd"),
"Rd", 40, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_EMoRParams, _(
"Camera response parameter"))
198 ADDCOLUMN(wxT(
"Re"),
"Re", 40, wxALIGN_LEFT,
true, HuginBase::ImageVariableGroup::IVE_EMoRParams, _(
"Camera response parameter"))
207 int width = wxConfigBase::Get()->Read(wxString::Format(
m_configClassName+wxT(
"/ColumnWidth%d"), j ), -1);
316 if(nrItems!=imageGroups.size())
318 if(nrItems<imageGroups.size())
320 for(
size_t i=nrItems;i<imageGroups.size();i++)
329 wxTreeItemIdValue cookie;
336 wxTreeItemIdValue cookie;
363 e.SetEventType(wxEVT_COMMAND_LIST_ITEM_SELECTED);
365 GetEventHandler()->ProcessEvent(e);
373 bool isSingleImage =
false;
379 const size_t imgNr=itemData->
GetImgNr();
390 wxChar
flags[] = wxT(
"--");
440 wxString text=_(
"not active");
441 if(img.getX()!=0.0 || img.getY()!=0.0 || img.getZ()!=0.0 || img.getTranslationPlaneYaw()!=0.0 || img.getTranslationPlanePitch()!=0.0)
445 text.Prepend(wxT(
" "));
477 std::vector<double> dist=img.getRadialDistortion();
542 std::vector<double> dist=img.getRadialVigCorrCoeff();
574 std::vector<float> vec = img.getEMoRParams();
611 wxTreeItemIdValue cookie;
615 bool haveSingleChild =
false;
635 wxString text=_(
"not active");
636 if(img.getX()!=0.0 || img.getY()!=0.0 || img.getZ()!=0.0 || img.getTranslationPlaneYaw()!=0.0 || img.getTranslationPlanePitch()!=0.0)
640 text.Prepend(wxT(
" "));
678 std::vector<double> dist=img.getRadialDistortion();
743 std::vector<double> dist=img.getRadialVigCorrCoeff();
769 std::vector<float> vec=img.getEMoRParams();
790 bool forceUpdate=
false;
791 if(nrItems!=imgs.size())
794 if(nrItems<imgs.size())
796 for(
size_t i=nrItems;i<imgs.size();i++)
805 wxTreeItemIdValue cookie;
812 wxTreeItemIdValue cookie;
814 HuginBase::UIntSet::const_iterator it=imgs.begin();
822 bool needsUpdate=
false;
835 if(needsUpdate || forceUpdate)
848 wxTreeItemIdValue cookie;
856 wxTreeItemIdValue childCookie;
884 for(HuginBase::UIntSet::const_iterator it=imgNrs.begin(); it!=imgNrs.end() && !opt;++it)
910 wxArrayTreeItemIds selected;
914 for(
size_t i=0;i<selected.size();i++)
919 wxTreeItemIdValue cookie;
947 int colNum = e.GetColumn();
962 wxRendererNative& renderer = wxRendererNative::Get();
963 const wxSize checkBoxSize = renderer.GetCheckBoxSize(
this);
964 wxImageList* checkboxImageList =
new wxImageList(checkBoxSize.GetWidth(), checkBoxSize.GetHeight(),
true, 0);
965 wxBitmap checkBoxImage(checkBoxSize, 32);
966 wxMemoryDC dc(checkBoxImage);
969 renderer.DrawCheckBox(
this, dc, wxRect(checkBoxSize));
970 dc.SelectObject(wxNullBitmap);
971 checkboxImageList->Add(checkBoxImage);
973 dc.SelectObject(checkBoxImage);
975 renderer.DrawCheckBox(
this, dc, wxRect(checkBoxSize), wxCONTROL_CHECKED);
976 dc.SelectObject(wxNullBitmap);
977 checkboxImageList->Add(checkBoxImage);
979 dc.SelectObject(checkBoxImage);
981 renderer.DrawCheckBox(
this, dc, wxRect(checkBoxSize), wxCONTROL_CURRENT);
982 dc.SelectObject(wxNullBitmap);
983 checkboxImageList->Add(checkBoxImage);
985 dc.SelectObject(checkBoxImage);
987 renderer.DrawCheckBox(
this, dc, wxRect(checkBoxSize), wxCONTROL_CHECKED | wxCONTROL_CURRENT);
988 dc.SelectObject(wxNullBitmap);
989 checkboxImageList->Add(checkBoxImage);
1029 SetWindowStyle(GetWindowStyle() | wxTR_NO_LINES);
1033 SetWindowStyle(GetWindowStyle() & ~wxTR_NO_LINES);
1110 bool allowMenuExtension=
true;
1111 if(e.GetItem().IsOk())
1118 bool varIsLinkable =
false;
1137 menu.Append(
ID_LINK,_(
"Link"));
1152 menu.Append(
ID_LINK, _(
"Link"));
1155 menu.AppendSeparator();
1159 if(data->
IsGroup() == emptyText)
1177 menu.AppendSeparator();
1180 menu.Append(
ID_EDIT, _(
"Edit image variables..."));
1184 if (selectedImages.size() == 1)
1211 allowMenuExtension=
false;
1214 if(allowMenuExtension)
1216 if(menu.GetMenuItemCount()>0)
1218 menu.AppendSeparator();
1223 wxMenu* subMenu=
new wxMenu();
1225 if(subMenu->GetMenuItemCount()>0)
1227 menu.Append(-1,_(
"Lens"), subMenu);
1235 subMenu=
new wxMenu();
1237 if(subMenu->GetMenuItemCount()>0)
1239 menu.Append(-1,_(
"Stacks"), subMenu);
1246 subMenu=
new wxMenu();
1248 if(subMenu->GetMenuItemCount()>0)
1250 menu.Append(-1, _(
"Control points"), subMenu);
1256 subMenu=
new wxMenu();
1258 if(subMenu->GetMenuItemCount()>0)
1260 menu.Append(-1, _(
"Reset"), subMenu);
1267 if(menu.GetMenuItemCount()>0)
1277 for(
size_t i=0; i<operations->size(); i++)
1281 menu->Append(
id, (*operations)[i]->GetLabel());
1290 const wxColour normalColour = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
1291 const wxColour disabledColour = wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT);
1294 wxTreeItemIdValue cookie;
1299 bool isActive =
true;
1302 wxTreeItemIdValue childCookie;
1304 while (child.IsOk())
1329 wxTreeItemIdValue childCookie;
1331 while (child.IsOk())
1350 wxTreeItemIdValue cookie;
1358 wxTreeItemIdValue childCookie;
1360 while (child.IsOk())
1387 std::copy(selectedImages.begin(), selectedImages.end(), std::inserter(activeImages, activeImages.end()));
1398 std::set_difference(activeImages.begin(), activeImages.end(), selectedImages.begin(), selectedImages.end(), std::inserter(newActiveImages, newActiveImages.end()));
1409 std::set<HuginBase::ImageVariableGroup::ImageVariableEnum> variables;
1411 if(
m_variableVector[m_selectedColumn]==HuginBase::ImageVariableGroup::IVE_Yaw)
1413 variables.insert(HuginBase::ImageVariableGroup::IVE_Pitch);
1414 variables.insert(HuginBase::ImageVariableGroup::IVE_Roll);
1415 variables.insert(HuginBase::ImageVariableGroup::IVE_X);
1416 variables.insert(HuginBase::ImageVariableGroup::IVE_Y);
1417 variables.insert(HuginBase::ImageVariableGroup::IVE_Z);
1418 variables.insert(HuginBase::ImageVariableGroup::IVE_TranslationPlaneYaw);
1419 variables.insert(HuginBase::ImageVariableGroup::IVE_TranslationPlanePitch);
1484 const bool ctrlPressed=wxGetKeyState(WXK_COMMAND);
1494 SetCursor(wxCURSOR_HAND);
1508 SetCursor(wxCURSOR_ARROW);
1510 wxTreeItemId item=
HitTest(e.GetPosition());
1525 wxPoint pos(e.GetPosition());
1550 for (
auto& i : images)
1554 const bool moveImageChecked = imgList[img1];
1555 imgList.erase(imgList.begin() + img1);
1556 if (img2 < imgList.size())
1558 imgList.insert(imgList.begin() + img2, moveImageChecked);
1562 imgList.push_back(moveImageChecked);
1565 for (
size_t i = 0; i < imgList.size(); ++i)
1637 wxTreeItemId item =
HitTest(e.GetPosition(),
flags, col);
1655 wxTreeItemIdValue cookie;
1657 while (childItem.IsOk())
1670 std::set<std::string> var;
1708 bool deactivate =
false;
1716 for (std::set<std::string>::const_iterator varIt = var.begin(); varIt != var.end(); ++varIt)
1719 for (HuginBase::UIntSet::const_iterator imgIt = imgs.begin(); imgIt != imgs.end() && !deactivate; ++imgIt)
1731 for (std::set<std::string>::const_iterator varIt = var.begin(); varIt != var.end(); ++varIt)
1733 for (HuginBase::UIntSet::const_iterator imgIt = imgs.begin(); imgIt != imgs.end(); ++imgIt)
1735 optVec[*imgIt].erase(*varIt);
1741 for (std::set<std::string>::const_iterator varIt = var.begin(); varIt != var.end(); ++varIt)
1743 for (HuginBase::UIntSet::const_iterator imgIt = imgs.begin(); imgIt != imgs.end(); ++imgIt)
1745 optVec[*imgIt].insert(*varIt);
1775 wxTreeItemId item =
HitTest(e.GetPosition(),
flags, col);
1776 if (item.IsOk() && (flags & wxTREE_HITTEST_ONITEMICON))
1798 wxTreeItemId item =
HitTest(e.GetPosition(),
flags, col);
1799 if (item.IsOk() && (flags & wxTREE_HITTEST_ONITEMICON))
1803 if (imgNr >= 0 && imgNr < 2)
1829 std::set<std::string> imgVars;
1831 if(var==
"cam_trans")
1833 imgVars.insert(
"TrX");
1834 imgVars.insert(
"TrY");
1835 imgVars.insert(
"TrZ");
1836 imgVars.insert(
"Tpy");
1837 imgVars.insert(
"Tpp");
1841 imgVars.insert(var);
1842 if(var==
"Vb" || var==
"Vc" || var==
"Vd")
1844 imgVars.insert(
"Vb");
1845 imgVars.insert(
"Vc");
1846 imgVars.insert(
"Vd");
1848 if(var==
"Vx" || var==
"Vy")
1850 imgVars.insert(
"Vx");
1851 imgVars.insert(
"Vy");
1853 if(var==
"Ra" || var==
"Rb" || var==
"Rc" || var==
"Rd" || var==
"Re")
1855 imgVars.insert(
"Ra");
1856 imgVars.insert(
"Rb");
1857 imgVars.insert(
"Rc");
1858 imgVars.insert(
"Rd");
1859 imgVars.insert(
"Re");
1871 wxArrayTreeItemIds selectedItem;
1874 for(
size_t i=0;i<selectedItem.size();i++)
1877 wxTreeItemId startItem;
1880 startItem=selectedItem[i];
1886 wxTreeItemIdValue cookie;
1899 for(HuginBase::UIntSet::iterator img=imgs.begin(); img!=imgs.end(); ++img)
1901 for(std::set<std::string>::const_iterator it=imgVars.begin(); it!=imgVars.end(); ++it)
1905 if((*it==
"y" || *it==
"p" || *it==
"r" || *it==
"TrX" || *it==
"TrY" || *it==
"TrZ" || *it==
"Tpy" || *it==
"Tpp") &&
1908 optVec[*img].erase(*it);
1913 optVec[*img].erase(*it);
1918 optVec[*img].erase(*it);
1923 optVec[*img].erase(*it);
1926 optVec[*img].insert(*it);
1930 optVec[*img].erase(*it);
1961 switch(e.GetKeyCode())
1965 wxCommandEvent ev(wxEVT_COMMAND_MENU_SELECTED, XRCID(
"action_add_images"));
1975 for (
auto& img : imgs)
1977 ImageCache::getInstance().removeImage(
m_pano->
getImage(img).getFilename());
1986 #if defined __WXMAC__
1990 if (e.GetExtraLong() == wxMOD_CMD)
2018 wxTreeItemIdValue cookie;
2030 if(e.IsEditCancelled())
2054 wxTreeItemIdValue cookie;
2065 wxString::Format(_(
"You have given a field of view of %.2f degrees.\n But the orthographic projection is limited to a field of view of 180 degress.\nDo you want still use that high value?"), val),
2071 wxICON_EXCLAMATION | wxYES_NO)==wxNO)
2117 wxTreeItemId item=
HitTest(e.GetPosition(),
flags, col);
2119 wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED,
ID_EDIT);
2120 GetEventHandler()->AddPendingEvent(commandEvent);
2128 : wxTreeListCtrlXmlHandler()
2136 cp->Create(m_parentAsWindow,
2138 GetPosition(), GetSize(),
2139 GetStyle(wxT(
"style")),
2149 return IsOfClass(node, wxT(
"ImagesTreeList"));
HuginBase::UIntSet GetDragGroupImages()
ImagesTreeCtrl()
general constructor
Base class for all panorama commands.
void Refresh(bool erase=TRUE, const wxRect *rect=NULL)
std::map< std::string, size_t > m_columnMap
map for easier access to column information
static const std::set< ConstImageVariableGroup::ImageVariableEnum > & getLensVariables()
Get the set of lens image variables.
void OnChar(wxTreeEvent &e)
event handler for key events
GroupMode m_groupMode
the active group mode
std::vector< UIntSet > getHDRStacks(const PanoramaData &pano, UIntSet allImgs, PanoramaOptions opts)
returns vector of set of output stacks
declaration of functions to handle stacks and layers
void SetGroupMode(GroupMode newMode)
sets the group mode to given mode
std::vector< UIntSet > UIntSetVector
std::vector< UIntSet > getExposureLayers(const PanoramaData &pano, UIntSet allImgs, PanoramaOptions opts)
returns vector of set of output exposure layers
void OnHeaderContextMenu(wxListEvent &e)
event handler for context menu on header
size_t GetChildrenCount(const wxTreeItemId &item, bool recursively=true)
move image from position1 to position2
virtual PanoCommand::PanoCommand * GetCommand(wxWindow *parent, HuginBase::Panorama &pano, HuginBase::UIntSet images, GuiLevel guiLevel)
returns the appropriate PanoCommand::PanoCommand to be inserted into GlobalCmdHistory, checks if operation is enabled
unsigned int getPartNumber(unsigned int imageNr) const
Get a part number from an image number.
Change the linking of some variables across parts of an ImageVariableGroup containing some specified ...
virtual wxObject * DoCreateResource()
bool str2double(const wxString &s, double &d)
void OnEndEdit(wxTreeEvent &e)
event handler for ending editing, updates the Panorama with modified value
void OnLeftDown(wxMouseEvent &e)
event handler for left mouse down, handles toggle of optimizer variables
void OnExecuteOperation(wxCommandEvent &e)
menu event handler for PanoOperation (context menu items)
void OnLeftUp(wxMouseEvent &e)
event handler for left up, handles end of dragging and updates of optimizer variables states ...
DisplayMode m_displayMode
the active display mode
void SetGuiLevel(GuiLevel newLevel)
sets the GuiLevel
declaration of main image tree control
void SetColumnWidth(int column, int width)
bool removeObserver(PanoramaObserver *observer)
remove a panorama observer.
ImageVariableGroup & getStacks()
Get the ImageVariableGroup representing the group of stack variables.
bool m_dragging
true, if dragging
void UpdateGroup(wxTreeItemId parent, const HuginBase::UIntSet imgs, HuginBase::UIntSet &changed)
updates the given group, updates number of images and the images itself
std::vector< HuginBase::ImageVariableGroup::ImageVariableEnum > m_variableVector
vector for easier access to linking information
Somewhere to specify what variables belong to what.
wxTreeItemId AppendItem(const wxTreeItemId &parent, const wxString &text, int image=-1, int selectedImage=-1, wxTreeItemData *data=NULL)
void OnUnlinkImageVariables(wxCommandEvent &e)
event handler for unlinking image variables
wxTreeItemId m_root
pointer to root item, not shown
void SetColumnShown(int column, bool shown=true)
wxTreeItemData * GetItemData(const wxTreeItemId &item) const
void EndEdit(bool isCancelled)
wxTreeItemId AddRoot(const wxString &text, int image=-1, int selectedImage=-1, wxTreeItemData *data=NULL)
void SetImgNr(long newImgNr)
virtual void panoramaChanged(HuginBase::Panorama &pano)
receives notification about panorama changes
wxString doubleTowxString(double d, int digits)
void SelectTab(size_t i)
selects the tab with index i
void DeleteChildren(const wxTreeItemId &item)
a variable has a value and a name.
bool set_contains(const _Container &c, const typename _Container::key_type &key)
#define DEBUG_ASSERT(cond)
simple class that forward the drop to the mainframe
include file for the hugin project
void AssignImageList(wxImageList *imageList)
void SetColumnEditable(int column, bool edit=true)
wxTreeItemId GetLastChild(const wxTreeItemId &item, wxTreeItemIdValue &cookie) const
wxTreeItemId GetItemParent(const wxTreeItemId &item) const
wxTreeItemId GetFirstChild(const wxTreeItemId &item, wxTreeItemIdValue &cookie) const
bool m_markDisabledImages
true, if disabled images should be marked with other font color
void OnDeactivateImage(wxCommandEvent &e)
event handler for deactivate image
wxTreeItemId HitTest(const wxPoint &point)
void OnLeftDblClick(wxMouseEvent &e)
event handler for left double click
unsigned int colorReferenceImage
Declare the ImageVariableGroup and ImageVariableGroupObserver classes.
void OnDpiChanged(wxDPIChangedEvent &e)
event handler for updating dpi
void Init(HuginBase::Panorama *pano)
initialization, connects all control with Panorama, register observer
wxTreeItemId m_leftDownItem
stores where left mouse click happend
#define ADDCOLUMN(header, mapName, width, align, isEditable, IVE, tooltip)
std::set< unsigned int > UIntSet
void OnContextMenu(wxTreeEvent &e)
event handler to display context menu
DisplayMode
enumeration for display mode, limits the displayed columns
void OnLinkImageVariables(wxCommandEvent &e)
event handler for linking image variables
bool m_needsUpdate
helper variable for update of output stacks/layers
wxTreeItemId GetNext(const wxTreeItemId &item) const
void SetItemImage(const wxTreeItemId &item, int image, wxTreeItemIcon which=wxTreeItemIcon_Normal)
updates the optimize vector, aka all variables which should be optimized
void MarkActiveImages(const bool markActive)
sets the flag, if active/disabled image should be marked with different colour
empirical model of response
UIntSetVector getPartsSet() const
return a vector which contains a HuginBase::UIntSet for each group with the corresponding images numb...
void OnBeginEdit(wxTreeEvent &e)
event handler for beginning editing
void UpdateImageText(wxTreeItemId item)
updates the information for the given image in tree
wxString m_configClassName
const OptimizeVector & getOptimizeVector() const
return the optimize settings stored inside panorama
void SetDisplayMode(DisplayMode newMode)
sets the display mode to given mode
Make a new part in a ImageVariableGroup for a set of images, given the variables that make up the gro...
Definition of dialog to edit image variables.
const long GetGroupNr() const
bool IsSelected(const wxTreeItemId &item) const
void SetDragGroupImages(HuginBase::UIntSet imageDragGroup_in, bool update_check_box=true)
void UnLinkImageVariables(bool linked)
helper procedure for link/unlink image variables
std::size_t getNrOfImages() const
number of images.
static MainFrame * Get()
hack.. kind of a pseudo singleton...
std::vector< unsigned int > getCtrlPointsForImage(unsigned int imgNr) const
return all control points for a given image.
GroupMode
enumeration for grouping mode
ImagesTreeData(const long &nr)
PanoOperationVector * GetLensesOperationVector()
returns list of PanoOperation for work with lenses
double m_editVal
value, which is currently edited
Switch the part number of an image.
PanoOperationVector * GetControlPointsOperationVector()
returns list of PanoOperation for work with control points
base class for different PanoOperations derived classes should overwrite protected PanoOperation::Get...
IMPLEMENT_DYNAMIC_CLASS(wxTreeListHeaderWindow, wxWindow)
ImageVariableGroup & getLenses()
Get the ImageVariableGroup representing the group of lens variables.
void SetItemBold(const wxTreeItemId &item, bool bold=true)
void AddColumn(const wxString &text, int width=DEFAULT_COL_WIDTH, int flag=wxALIGN_LEFT, int image=-1, bool shown=true, bool edit=false, const wxString &tooltip=wxEmptyString)
std::vector< std::string > m_columnVector
vector for easier access to column information
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxT("panel"))
creates the control
void OnColumnWidthChange(wxListEvent &e)
event handler, when column width was changed, save into wxConfig
wxTreeItemId GetNextChild(const wxTreeItemId &item, wxTreeItemIdValue &cookie) const
static GlobalCmdHist & getInstance()
HuginBase::Panorama * m_pano
void addCommand(PanoCommand *command, bool execute=true)
Adds a command to the history.
bool m_optimizerMode
true, if in optimizer mode
int GetColumnCount() const
wxTreeItemId m_lastCurrentItem
stores last item on which the mouse was hovering
void SetGuiLevel(GuiLevel newSetting)
sets the GuiLevel of the control
UIntSet getActiveImages() const
get active images
const bool IsGroup() const
update a single variable, possibly for a group of images
HuginBase::UIntSet GetSelectedImages()
returns the selected images
void OnEditImageVariables(wxCommandEvent &e)
event handler for showing image variables editing dialog
void SetItemTextColour(const wxTreeItemId &item, const wxColour &colour)
void OnSelectAll(wxCommandEvent &e)
event handler for select all optimizer variables
void addObserver(PanoramaObserver *o)
add a panorama observer.
void OnSelectLensStack(wxCommandEvent &e)
event handler for select all optimizer variables for selected lens/stack
size_t m_selectedColumn
selected column
include file for the hugin project
const PanoramaOptions & getOptions() const
returns the options for this panorama
std::map< int, PanoOperation::PanoOperation * > m_menuOperation
map with current active context menu PanoOperation
void OnBeginDrag(wxTreeEvent &e)
event handler when dragging begins, veto if dragging is not possible
the main images tree control, used on images and optimizer tabs
GLPreviewFrame * getGLPreview()
options wxIntPtr wxIntPtr sortData std::vector< PanoInfo > * data
void OnActivateImage(wxCommandEvent &e)
event handler for activate image
void OnMouseMove(wxMouseEvent &e)
event handler for mouse motion, handles focussing of check boxes
void GenerateSubMenu(wxMenu *menu, PanoOperation::PanoOperationVector *operations, int &id)
generates submenu for given PanoOperationVector
int GetItemImage(const wxTreeItemId &item, wxTreeItemIcon which=wxTreeItemIcon_Normal) const
GuiLevel m_guiLevel
stores the active GuiLevel
wxString m_editOldString
wxString, as shown before editing started
PanoOperationVector * GetResetOperationVector()
returns list of PanoOperation for resetting
void update()
Update part numbers for each variable group.
void SelectAllParameters(bool select, bool allImages)
select/unselect all variables in the active column true selects all, false unselect all true works ...
PanoOperationVector * GetImagesOperationVector()
returns list of PanoOperation for work with images
size_t GetSelections(wxArrayTreeItemIds &) const
std::vector< std::set< std::string > > OptimizeVector
std::vector< PanoOperation * > PanoOperationVector
HuginBase::StandardImageVariableGroups * m_variable_groups
void ExpandAll(const wxTreeItemId &item)
HuginBase::UIntSet m_draggingImages
UIntSet of dragging images.
const SrcPanoImage & getImage(std::size_t nr) const
get a panorama image, counting starts with 0
remove multiple images from a panorama
void UpdateGroupText(wxTreeItemId item)
updates the information fot the given lens/stack in the tree
void fill_set(_Container &c, typename _Container::key_type begin, typename _Container::key_type end)
void UpdateItemFont()
update the font colour for all items
void OnUnselectLensStack(wxCommandEvent &e)
event handler for unselect all optimizer variables for selected lens/stack
std::size_t getNumberOfParts() const
get the number of parts.
All variables of a source image.
PanoOperationVector * GetStacksOperationVector()
returns list of PanoOperation for stacks
wxString GetItemText(const wxTreeItemId &item) const
HuginBase::UIntSet m_editableColumns
set, which contains editable columns (all column which contains numeric image variables ...
virtual bool CanHandle(wxXmlNode *node)
const long GetImgNr() const
static const std::set< ConstImageVariableGroup::ImageVariableEnum > & getStackVariables()
Get the set of stack image variables.
void CreateColumns()
creates all columns and stores information in m_columnMap, m_columnVector, m_editableColumns and m_va...
void panoramaImagesChanged(HuginBase::Panorama &pano, const HuginBase::UIntSet &imgNr)
receive the update signal and update display accordingly
void SetItemText(const wxTreeItemId &item, const wxString &text)
void Delete(const wxTreeItemId &item)
void OnUnselectAll(wxCommandEvent &e)
event handler for unselect all optimizer variables
void UpdateOptimizerVariables()
updates the display of the optimizer variables (set font)
void CreateCheckboxImages()
create image list with necessary images of checkboxes
int GetColumnWidth(int column) const
Dialog for editing image variables.
void SetOptimizerMode()
sets to control into optimizer mode
virtual ~ImagesTreeCtrl(void)
destructor
unsigned int optimizeReferenceImage