From: Claire Mouton Date: Thu, 13 Mar 2014 15:23:15 +0000 (+0100) Subject: Merge branch 'master' of ssh://git.creatis.insa-lyon.fr/creaContours X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=242e4c37e5e22bcba90456327564ea9b3d1d6274;hp=8fcd100da3a31bb5df1cf1a0e004c06580e0b079;p=creaContours.git Merge branch 'master' of ssh://git.creatis.insa-lyon.fr/creaContours --- diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx index 2bf2f0a..a63bd56 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx @@ -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 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 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 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_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; zSetImage( _theViewPanel->getImageData() ); - _viewColorLayerImage->SetImage( NULL ); - _viewColorLayerImagePanel->SetColorLayerImageView( _viewColorLayerImage ); - _viewColorLayerImage->SetwxVtkBaseView( _theViewPanel->getWxVtkBaseView() ); + _viewColorLayerImagePanel->GetColorLayerImageViewManager()->SetwxVtkBaseView( 0 , _theViewPanel->getWxVtkBaseView() ); } return _viewColorLayerImagePanel; } diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h index 606221d..ba7da1b 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h @@ -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 _images; bool _actorPresent; diff --git a/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.cxx b/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.cxx index 5f06fb8..3f4a144 100644 --- a/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.cxx +++ b/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.cxx @@ -114,12 +114,15 @@ void KernelManagerContour::setVectImages(std::vector vectimg) vtkImageChangeInformation* change = vtkImageChangeInformation::New(); change->SetInformationInput(img); change->SetInputConnection(img->GetProducerPort()); - img->GetSpacing(spc); change->SetOutputSpacing(1,1,1); - change->Update(); +//EED 18 fev 2014 + change->SetOutputOrigin (0, 0, 0); + + change->Update(); vectspc.clear(); + vectspc.push_back(spc[0]); vectspc.push_back(spc[1]); vectspc.push_back(spc[2]);