]> Creatis software - creaContours.git/commitdiff
2340 creaContours Bug New Normal ColorLayerViewer / Manager new c interface
authordavila <eduardo.davila@creatis.insa-lyon.fr>
Thu, 13 Mar 2014 13:12:13 +0000 (14:12 +0100)
committerdavila <eduardo.davila@creatis.insa-lyon.fr>
Thu, 13 Mar 2014 13:12:13 +0000 (14:12 +0100)
lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx
lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h

index 2bf2f0a825bec796a7ee39ed520f7c09bf3d671a..a63bd56add5a897caead3eaf47b23e03bab94904 100644 (file)
@@ -92,9 +92,8 @@ char wxContourMainFrame::COPY = 'C';
                _viewMaskImage                          = NULL;
                _viewMaskImagePanel                     = NULL;
                _viewThresholdImage                     = NULL;
-               _viewThresholdImagePanel        = NULL;
-               _viewColorLayerImage            = NULL;
-               _viewColorLayerImagePanel       = NULL;
+               _viewThresholdImagePanel                = NULL;
+               _viewColorLayerImagePanel               = NULL;
        }
 
        wxContourMainFrame :: wxContourMainFrame(wxWindow* parent, wxWindowID id,const wxString& title,const wxPoint& pos,const wxSize& size,std::vector<vtkImageData*> images, long style,std::string datadir)
@@ -113,9 +112,8 @@ char wxContourMainFrame::COPY = 'C';
                _viewMaskImage                          = NULL;
                _viewMaskImagePanel                     = NULL;
                _viewThresholdImage                     = NULL;
-               _viewThresholdImagePanel        = NULL;
-               _viewColorLayerImage            = NULL;
-               _viewColorLayerImagePanel       = NULL;
+               _viewThresholdImagePanel                = NULL;
+               _viewColorLayerImagePanel               = NULL;
 
                // set up default notebook style
                m_notebook_style =wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER;
@@ -699,13 +697,6 @@ void wxContourMainFrame::changeInstant()
                        }
                }
 
-       // Refresh Threshold image
-               if(_viewColorLayerImage!=NULL){
-                       _viewColorLayerImage->SetZ(actualSlice);
-                       if (_viewColorLayerImagePanel->IsVisible()==true){
-                               _viewColorLayerImage->onThreshold();
-                       }
-               }
 
                updateInstantOutlines();
                updateInstantImageData();
@@ -2513,7 +2504,6 @@ void wxContourMainFrame::SetScalarRange(int grayRangeMin, int grayRangeMax)
 
 void wxContourMainFrame::onInformationContourLabels(int typeContourGroup,int selection,int minimumZ,int maximumZ,int grayRangeMin, int grayRangeMax)
 {
-//EED01Juillet2009     GenerateContourExtractData();
 
        wxString tempString;
        int maxContourGroup     =       0;
@@ -2538,8 +2528,6 @@ void wxContourMainFrame::onInformationContourLabels(int typeContourGroup,int sel
        std::vector<int> tempVector;
        _instantPanel->getInstant( tempVector );
 
-//EED01Juillet2009     vtkImageData *imagedata = _theViewPanel->getImageData();
-//     int sizeZ = _theViewPanel->GetImageDataSizeZ();
        int z;
        int ii,sizeLstContourThings;
 
@@ -2562,7 +2550,6 @@ void wxContourMainFrame::onInformationContourLabels(int typeContourGroup,int sel
 
 
        totalZ  = maxZ-minZ+1;
-//EED01Juillet2009     _contourextractdata->SetImage( imagedata);
 
        _contourextractdata->InitVolumeStatistics();
 
@@ -2826,7 +2813,6 @@ void wxContourMainFrame::onSaveResults(std::string directory,std::string namefil
 void wxContourMainFrame::SaveValuesXYZ(std::string directory,std::string namefile,int typeContourGroup)
 {
        wxBusyCursor wait;
-//EED01Juillet2009     GenerateContourExtractData();
 
        //int typeContourGroup = this->_radiolstboxContourGroup->GetSelection();
        _contourextractdata ->SetTypeOperation( typeContourGroup % 3 );
@@ -2842,7 +2828,6 @@ void wxContourMainFrame::SaveValuesXYZ(std::string directory,std::string namefil
        std::vector<int> tempVector;
        _instantPanel->getInstant( tempVector );
 
-//EED01Juillet2009     vtkImageData *imagedata = _theViewPanel->getSceneManager()->GetImageData();
        int sizeZ = _theViewPanel->getSceneManager()->GetImageDataSizeZ();
        int z;
        int ii,sizeLstContourThings;
@@ -2856,7 +2841,6 @@ void wxContourMainFrame::SaveValuesXYZ(std::string directory,std::string namefil
        maxZ    = sizeZ;//_mbarrange->GetEnd();
        totalZ  = maxZ-minZ+1;
 
-//EED01Juillet2009     _contourextractdata->SetImage( imagedata);
 
 // For each slice..
        for ( z=0 ; z<sizeZ ; z++)
@@ -2954,7 +2938,6 @@ void wxContourMainFrame::SaveValuesXYZ(std::string directory,std::string namefil
 
 void wxContourMainFrame::getMaskValue(vtkImageData ** mask,vtkImageData ** value,int typeContourGroup, int selection, int minZ, int maxZ){
        wxBusyCursor wait;
-//EED01Juillet2009     GenerateContourExtractData();
 
        //int typeContourGroup = this->_radiolstboxContourGroup->GetSelection();
        if (typeContourGroup==3)
@@ -2993,7 +2976,6 @@ void wxContourMainFrame::getMaskValue(vtkImageData ** mask,vtkImageData ** value
 
        totalZ  = maxZ-minZ;
 
-//EED01Juillet2009     _contourextractdata->SetImage( imagedata);
 
        // cleanning image before range
        for (z=0; z<minZ; z++){
@@ -3195,11 +3177,7 @@ wxPanel *wxContourMainFrame::getColorLayerImageViewPanel(wxWindow *parent)
                int min = (int)floor (range[0]);
                int max = (int)ceil (range[1]);
                _viewColorLayerImagePanel = new ColorLayerImageViewPanel( parent, min, max , 1);
-               _viewColorLayerImage = new ColorLayerImageView();
-//             _viewColorLayerImage->SetImage( _theViewPanel->getImageData() );
-               _viewColorLayerImage->SetImage( NULL );
-               _viewColorLayerImagePanel->SetColorLayerImageView( _viewColorLayerImage );
-               _viewColorLayerImage->SetwxVtkBaseView( _theViewPanel->getWxVtkBaseView() );
+               _viewColorLayerImagePanel->GetColorLayerImageViewManager()->SetwxVtkBaseView( 0 , _theViewPanel->getWxVtkBaseView() );
        }
        return _viewColorLayerImagePanel;
 }
index 606221d4bf3a89657859e083174d6fa7118531a9..ba7da1b5182f88f71d8e9e09cecc809437dee3cd 100644 (file)
@@ -379,20 +379,19 @@ private:
 
        wxAuiManager                m_mgr;
        wxAuiNotebook               *notebook;
-    long                        m_notebook_style;
-    long                        m_notebook_theme;
-    int                         _numberOfVariablesStatistics;
+       long                        m_notebook_style;
+       long                        m_notebook_theme;
+       int                         _numberOfVariablesStatistics;
 
        // Contour Image Mask
-       ThresholdImageView                      *_viewMaskImage;
+       ThresholdImageView              *_viewMaskImage;
        ThresholdImageViewPanel         *_viewMaskImagePanel;
 
        // Threshold Image
-       ThresholdImageView                      *_viewThresholdImage;
+       ThresholdImageView              *_viewThresholdImage;
        ThresholdImageViewPanel         *_viewThresholdImagePanel;
 
        // Color Layer Image
-       ColorLayerImageView                     *_viewColorLayerImage;
        ColorLayerImageViewPanel        *_viewColorLayerImagePanel;
        std::vector<vtkImageData*>  _images;
        bool                        _actorPresent;