spreadPanel = NULL;
infoWin=NULL;
informationPanel=NULL;
+ mirrorPanel=NULL;
splitterwindow = new wxSplitterWindow(this,-1, wxDefaultPosition, wxSize(sizex, sizey), wxSP_3DSASH, wxString(_T("")));
infoPanel->Refresh();
this->Layout();
this->Refresh();
+}
+/**
+** Hide the panel in the
+**/
+void interfMainPanel::hidePanel( ){
+ wxContourMainFrame::getInstance()->showAxis(false);
+ wxSizer* sizer = infoPanel->GetSizer();
+
+ if(currentWindow != NULL){
+ currentWindow->Hide();
+ sizer->Remove(currentWindow);
+ }
+ wxPanel * emptyPanel = new wxPanel(interfMainPanel::getInstance()->getInfoPanel(), -1, wxDefaultPosition, wxDefaultSize, wxBORDER_STATIC, wxString(_T("")));
+ sizer->Add(emptyPanel);
+ currentWindow = emptyPanel;
+ currentWindow->Show(true);
+
+ splitterwindow->SetSashPosition(splitterwindow->GetSashPosition()+1);
+ splitterwindow->SetSashPosition(splitterwindow->GetSashPosition()-1);
+
+ infoPanel->Layout();
+ infoPanel->Refresh();
+ this->Layout();
+ this->Refresh();
}
/**
wxContourMainFrame::getInstance()->showAxis(false);
wxContourMainFrame::getInstance()->onCreateContourCircle();
}
+void interfMainPanel::onCreateContourLine( ){
+ wxContourMainFrame::getInstance()->showAxis(false);
+ wxContourMainFrame::getInstance()->onCreateContourLine();
+}
void interfMainPanel::onCreateContoursBullEye(wxPanel* panBull){
wxContourMainFrame::getInstance()->showAxis(false);
wxContourMainFrame::getInstance()->onCreateContourBullEye(panBull);
return wxContourMainFrame::getInstance()->getImageData();
}
-void interfMainPanel::onSegmentationOneSlice(int isovalue,int sampling,int method){
+void interfMainPanel::onSegmentationOneSlice(int isovalue,int sampling,int method)
+{
wxContourMainFrame::getInstance()->onSegmentationOneSlice(isovalue, sampling, method);
}
+void interfMainPanel::onSegmentationOneSliceITK(wxString distance, wxString sigma, wxString alfa, wxString beta, wxString propagation, wxString iterations, wxString inflation){
+ wxContourMainFrame::getInstance()->onSegmentationOneSliceITK(distance, sigma, alfa, beta, propagation, iterations, inflation);
+}
+
int interfMainPanel::GetImageDataSizeZ(){
return wxContourMainFrame::getInstance()->GetImageDataSizeZ();
}
wxContourMainFrame::getInstance()->onSegmentationAllSlice(minZ, maxZ,isovalue,sampling,method);
}
+void interfMainPanel::onMirror()
+{
+ wxContourMainFrame::getInstance()->onMirror();
+}
+
void interfMainPanel::setLabelSegmentationPanelVTK(wxString tmpString){
((interfSegmentationPanelVTK*)segmentationPanel)->setLabel(tmpString);
}
segmentPanelITK->Layout();
}
showPanel(segmentPanelITK);
- //contourevent->showAxis(true);
- //axisshown = true;
+ wxContourMainFrame::getInstance()->showAxis(true);
+ axisshown = true;
}
void interfMainPanel::onRigidPressed(){
infoWin->SetAutoLayout( true );
infoWin->Layout();
- infoWin->Show();
+ infoWin->Show();
}else {
void interfMainPanel::onSnakePressed(){
wxContourMainFrame::getInstance()->onSnakePressed();
}
+
+void interfMainPanel::onMirrorPressed(){
+ if(mirrorPanel==NULL){
+
+ mirrorPanel = new wxPanel(interfMainPanel::getInstance()->getInfoPanel(), -1, wxDefaultPosition, wxDefaultSize, wxBORDER_STATIC, wxString(_T("")));
+ wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1);
+ mirrorPanel->SetSizer(flexsizer, true);
+ mirrorPanel->SetAutoLayout( true );
+ panelMirror = new interfMirrorPanel(mirrorPanel);
+
+ wxStaticText* stattext = new wxStaticText(mirrorPanel, -1, wxString(_T(" Mirroring Tool ")), wxDefaultPosition,
+ wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T("")));
+
+ flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE);
+ flexsizer->Add(panelMirror, wxEXPAND);
+ mirrorPanel->Layout();
+
+ refLineShown=true;
+
+ showPanel(mirrorPanel);
+ wxContourMainFrame::getInstance()->referenceLine();
+ }
+
+ else
+ {
+ if(refLineShown)
+ {
+ wxContourMainFrame::getInstance()->refLineHide();
+ refLineShown=false;
+
+ hidePanel();
+ }
+
+ else if (!refLineShown)
+ {
+ wxContourMainFrame::getInstance()->refLineShow();
+ refLineShown=true;
+
+ showPanel(mirrorPanel);
+ }
+ }
+
+}