crea::VtkBasicSlicer(images.front());
images.front()->Delete();
+ w.OnExit();
}
else if (w.GetReturnCode() == wxID_CANCEL)
{
+ w.OnExit();
std::cout << "$$$$ main : user clicked 'CANCEL' $$$$"<<std::endl;
}
else
{
+ w.OnExit();
std::cout << "$$$$ main : dialog ended without return code ! $$$$"
<<std::endl;
void OnContextualMenu(EventType& event);
void OnMenuTest(wxCommandEvent& event);
void OnValid(bool valid);
+ void OnExit(){mView->StopPlayer();}
// void OnButtonOk(wxCommandEvent& event);
// void OnButtonCancel(wxCommandEvent& event);
int level=GetTreeViewMap()["Local database"]->GetNumberOfLevels();
std::vector<tree::Node*> im=GetTreeViewMap()["Local database"]->GetSelected(level+1);
ReadImagesNotThreaded(s,im,dim);
- mViewer->StopPlayer();
}
//======================================================================
/// Returns the selected Images so that they comply with the given parameter(4D)
/// Callback called when a selection from a TreeView has changed
//(overloaded from GimmickView)
void OnSelectionChange(std::vector<tree::Node*>& s);
-
+ ///Stops the player
+ void StopPlayer(){mViewer->StopPlayer();}
///Sends a request to read the currently selected node and the ones that surround it.
<<"'"<<level
<<std::endl);
int _id=0;
+ int r=100;
+ int g=100;
+ int b=100;
//Adds columns
GetTreeHandler()->LoadChildren(*i,1);
tree::Node::ChildrenListType::reverse_iterator j;
item.SetText( crea::std2wx(s));
// item.SetTextColour(*wxRED);
- // item.SetBackgroundColour(*wxBLACK);
+
+ //Setting the color according to the parent
+ /*
+ if(l==0)
+ {
+ item.SetBackgroundColour(wxColour(r,g,b));
+ mColorMap.insert(NodeColorPair(*j,wxColour(r,g,b)));
+ }
+ else if(l!=mLevelList.size()-1)
+ {
+ item.SetBackgroundColour(mColorMap[*i]);
+ mColorMap.insert(NodeColorPair(*j,mColorMap[*i]));
+ }
+ else
+ {
+ item.SetBackgroundColour(mColorMap[*i]);
+ }
+ r+=20;
+ g+=20;
+ b+=20;*/
+
item.SetColumn(0);
- //Sets the last level as selecte....How to make it select only the first time?
+ //Sets the last level as selected....How to make it select only the first time?
//if (level==mLevelList.size()) item.SetState(wxLIST_STATE_SELECTED);
GetCtrl(l)->SetItem(item);
bool mDirection;
///The last selected item on the list
long mLastSelected;
-
+ ///The last selection of nodes
std::vector<tree::Node*> mSelected;
+ ///The color map
+ typedef std::map<tree::Node*,wxColour> ColorMap;
+ typedef std::pair<tree::Node*,wxColour> NodeColorPair;
+ ColorMap mColorMap;