From: Eduardo Davila Date: Fri, 16 Jul 2010 17:32:44 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: CREATOOLS.2-0-3~9 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?p=creaContours.git;a=commitdiff_plain;h=6383d69864c69a97539b59d3e39406c79408577b *** empty log message *** --- diff --git a/appli/wxContourGUIExample/wxContourGUIExample.cxx b/appli/wxContourGUIExample/wxContourGUIExample.cxx index 1e93eb1..fd48714 100644 --- a/appli/wxContourGUIExample/wxContourGUIExample.cxx +++ b/appli/wxContourGUIExample/wxContourGUIExample.cxx @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------------------------------------------- // Class definition include //---------------------------------------------------------------------------------------------------------------- - + #include "wxContourGUIExample.h" #include "wxContourMainFrame.h" //#include "OutlineModelManager.h" diff --git a/lib/Interface_Icons_NDimensions/interfMainPanel.cxx b/lib/Interface_Icons_NDimensions/interfMainPanel.cxx index d9c4e6c..6bbd832 100644 --- a/lib/Interface_Icons_NDimensions/interfMainPanel.cxx +++ b/lib/Interface_Icons_NDimensions/interfMainPanel.cxx @@ -887,7 +887,7 @@ void interfMainPanel::onColorLayerImagePressed() colorImageLayerPanel->SetSizer(flexsizer, true); colorImageLayerPanel->SetAutoLayout( true ); //configPanel->SetEventHandler(this->contourevent); - wxPanel *panel = wxContourMainFrame::getInstance()->getThresholdImageViewPanel( colorImageLayerPanel ); + wxPanel *panel = wxContourMainFrame::getInstance()->getColorLayerImageViewPanel( colorImageLayerPanel ); wxStaticText* stattext = new wxStaticText(colorImageLayerPanel, -1, wxString(_T(" Color Image Layer ")), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T(""))); flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE); @@ -908,7 +908,7 @@ void interfMainPanel::onThresholdPressed() thresholdPanel->SetSizer(flexsizer, true); thresholdPanel->SetAutoLayout( true ); //configPanel->SetEventHandler(this->contourevent); - wxPanel *panel = wxContourMainFrame::getInstance()->getColorLayerImageViewPanel( thresholdPanel ); + wxPanel *panel = wxContourMainFrame::getInstance()->getThresholdImageViewPanel( thresholdPanel ); wxStaticText* stattext = new wxStaticText(thresholdPanel, -1, wxString(_T(" Threshold segmentation ")), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T(""))); flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE); diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx index 499121e..a1276c0 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx @@ -68,7 +68,8 @@ char wxContourMainFrame::COPY = 'C'; _viewMaskImagePanel = NULL; _viewThresholdImage = NULL; _viewThresholdImagePanel = NULL; - + _viewColorLayerImage = NULL; + _viewColorLayerImagePanel = NULL; } wxContourMainFrame :: wxContourMainFrame(wxWindow* parent, wxWindowID id,const wxString& title,const wxPoint& pos,const wxSize& size,std::vector images, long style,std::string datadir) @@ -88,6 +89,8 @@ char wxContourMainFrame::COPY = 'C'; _viewMaskImagePanel = NULL; _viewThresholdImage = NULL; _viewThresholdImagePanel = NULL; + _viewColorLayerImage = NULL; + _viewColorLayerImagePanel = NULL; // set up default notebook style m_notebook_style =wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER; @@ -670,7 +673,15 @@ void wxContourMainFrame::changeInstant() _viewThresholdImage->onThreshold(); } } - + + // Refresh Threshold image + if(_viewColorLayerImage!=NULL){ + _viewColorLayerImage->SetZ(actualSlice); + if (_viewColorLayerImagePanel->IsVisible()==true){ + _viewColorLayerImage->onThreshold(); + } + } + updateInstantOutlines(); updateInstantImageData(); updateInstantAxes(); @@ -3028,20 +3039,15 @@ wxPanel *wxContourMainFrame::getColorLayerImageViewPanel(wxWindow *parent) { if (_viewColorLayerImagePanel==NULL) { - _viewColorLayerImagePanel = new wxPanel(parent, -1); -/*EED Borrame double range[2]; _theViewPanel->getImageData()->GetScalarRange(range); int min = (int)floor (range[0]); int max = (int)ceil (range[1]); - _viewColorLayerImagePanel = new ThresholdImageViewPanel( parent, min, max , 1); - _viewThresholdImage = new ThresholdImageView(); - _viewThresholdImage->SetImage( _theViewPanel->getImageData() ); - _viewThresholdImage->SetminMaxValue( min, max); - _viewThresholdImage->SetBaseColor( 1,0,0 ); - _viewThresholdImagePanel->SetThresholdImageView( _viewThresholdImage ); - _viewThresholdImage->SetwxVtkBaseView( _theViewPanel->getWxVtkBaseView() ); -*/ + _viewColorLayerImagePanel = new ColorLayerImageViewPanel( parent, min, max , 1); + _viewColorLayerImage = new ColorLayerImageView(); + _viewColorLayerImage->SetImage( _theViewPanel->getImageData() ); + _viewColorLayerImagePanel->SetColorLayerImageView( _viewColorLayerImage ); + _viewColorLayerImage->SetwxVtkBaseView( _theViewPanel->getWxVtkBaseView() ); } return _viewColorLayerImagePanel; } diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h index 4b6ac62..32adc0f 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h @@ -38,36 +38,8 @@ #include "ThresholdImageView.h" #include "ThresholdImageViewPanel.h" -//EED #include "ColorLayerImageView.h" -//EED #include "ColorLayerImageViewPanel.h" - - -//#include "ContourThing.h" -//#include "AxeThing.h" -//#include "ImageSourceThing.h" -//#include "ImageSectionThing.h" -//#include "InstantMembersNameList.h" -//#include "OutlineGroup.h" -//#include "SomeEnvironment.h" -//#include "ContourWorkspace.h" -//#include "ContourWrap_ViewControl.h" -//#include "Instant.h" -//#include "PerformingOperation.h" - -//#include "ContourThing.h" - -//#include "OutlineModelManager.h" - -//#include "wxContour_ButtonsBar.h" -//#include "wxContour_ControlPanel.h" - -//#include "wxContour_Grid.h" -//#include "wxContour_DrawToolsPanel.h" -//#include "wxContour_OperationsToolsPanel.h" -//#include "wxContour_AutomaticFormsToolsPanel.h" -//#include "wxContour_StandardToolsPanel.h" -//#include "wxContour_EdtionToolsPanel.h" -//#include "wxContour_ListViewPanel.h" +#include "ColorLayerImageView.h" +#include "ColorLayerImageViewPanel.h" //ITK @@ -165,16 +137,6 @@ class wxContourMainFrame : public wxPanel { void ShowToolsPanel(bool show); -// void setButtonsBar( wxContour_ButtonsBar * theButtonsBar ); -// void setGrid( wxContour_Grid * theGridPanel ); -// void setDrawToolsPanel( wxContour_DrawToolsPanel * theDrawToolsPanel ); -// void setOperationsToolsPanel( wxContour_OperationsToolsPanel * theDrawToolsPanel ); -// void setAutomaticFormsPanel( wxContour_AutomaticFormsToolsPanel * theAutoFormsPanel ); -// void setStandardToolsPanel( wxContour_StandardToolsPanel * theStandardToolsPanel ); -// void setEditionToolsPanel( wxContour_EdtionToolsPanel * theEditionToolsPanel ); -// void setListViewPanel( wxContour_ListViewPanel * theListViewPanel ); - - ////------------------------------------------------------------------------------------------------------------ //// Methods for capturing events ////------------------------------------------------------------------------------------------------------------ @@ -275,28 +237,17 @@ class wxContourMainFrame : public wxPanel { //==================================================================================================== void showAxis(bool show); - void onRigidPressed(); - void onWidthOfContour(double width); - int getColorWindow(); int getWindowLevel(); - void onBrigthnessColorWindowLevel(int colorwindow,int windowlevel); - void onInterpolation(bool interpolate); - void onChangeInstant(std::string name,int actual); - void resetAppend(); - void onSpreadAdd(); - void onSpreadGo(int type); - void getInstantVector(std::vector& tempVector); - std::vector getOutlinesName(int slide); // @@ -304,22 +255,13 @@ class wxContourMainFrame : public wxPanel { // @param typeContourGroup - int The operation id (AND,OR,XOR,ALL=3) // void onInformationContourLabels(int typeContourGroup,int selection,int minimumZ,int maximumZ,int grayRangeMin, int grayRangeMax); - void onSaveResults(std::string directory,std::string namefile, std::string filename, int typeContourGroup, int selection, int minZ, int maxZ, bool XYZValues, bool contourImage, bool statistics); - void SaveValuesXYZ(std::string directory,std::string namefile, int typeContourGroup); - - - void onChangeInstantInstantPanel(std::string name,int value, int minshow, int maxshow); - void onSnakePressed(); - void saveFileWithContoursAutomatique(); - void ShowResultImages(int typeContourGroup, int selection, int minZ, int maxZ ); - wxPanel *getMaskImageViewPanel(wxWindow *parent); void SetContourGroup(int contourGroup); wxPanel *getThresholdImageViewPanel(wxWindow *parent); @@ -389,19 +331,12 @@ private: //------------------------------------------------------------------------------------------------------------ int _contourGroup; - static wxContourMainFrame* instance; - KernelManagerContour* kernelManager; - interfMainPanel* _pannew; - PerformingOperation* _performingOperation; - std::string _datadir; - wxContourViewPanel* _theViewPanel; - wxInstantChooserPanel * _instantPanel; //AD: 03-09: This attributes represents the reference line that is going to be used for the mirroring @@ -409,16 +344,12 @@ private: manualContourModelLine * _refLineModel; manualViewLine * _refLineView; - - wxAuiManager m_mgr; wxAuiNotebook * notebook; - long m_notebook_style; long m_notebook_theme; int _numberOfVariablesStatistics; - // Contour Image Mask ThresholdImageView *_viewMaskImage; ThresholdImageViewPanel *_viewMaskImagePanel; @@ -428,44 +359,30 @@ private: ThresholdImageViewPanel *_viewThresholdImagePanel; // Color Layer Image -//EED ColorLayerImageView *_viewColorLayerImage; -//EED ColorLayerImageViewPanel *_viewColorLayerImagePanel; - wxPanel *_viewColorLayerImagePanel; - + ColorLayerImageView *_viewColorLayerImage; + ColorLayerImageViewPanel *_viewColorLayerImagePanel; std::vector _images; - bool _actorPresent; - - - - /*DECLARE_CLASS(wxContourMainFrame) // any class wishing to process wxWindows events must use this macro DECLARE_EVENT_TABLE()*/ bool _creatingContoursActive; ////////JCP 21 - 11 - 08 void createContour( int typeContour ); - //manualContourModel * factoryManualContourModel(int typeContour); - manualBaseModel * factoryManualContourModel(wxPanel* panel); - ContourExtractData *_contourextractdata; - void saveState(); void loadState(std::string filename); void loadContours( FILE *pFile, bool staticContour ); - void saveFileWithContours( std::string filename ); void onLoadContours(std::string fileNameContourROI); int inredo; int inundo; std::string stundoredo; - - static char COPY; //CMRU 17-08-09-----------------------------------------------------------------------------------------------