X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FThresholdImageView%2FLayerImageBase.cxx;h=316f7851eb5561ed15c7bd9fed4fd6abb2378a97;hb=c85eb0d2045092682d9ec729097ba1a06084732c;hp=1e402d3b35785d86341c215e7f797ca9285c2487;hpb=4645482ed1eae5aaabdd813b784acafd13c41179;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx index 1e402d3..316f785 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx @@ -32,7 +32,7 @@ #include "wxMPRBaseData.h" #include "wxVtk2DBaseView.h" -#include "wxVTKRenderWindowInteractor.h" +#include "creawxVTKRenderWindowInteractor.h" #include "vtkTextProperty.h" @@ -243,6 +243,7 @@ void LayerImageBase::SetImage(vtkImageData* image) _imageChangeInformation->SetInput(_image); #else _imageChangeInformation->SetInputData(_image); + _imageChangeInformation->Update(); #endif } @@ -258,9 +259,9 @@ void LayerImageBase::SetSpcOriginalLayer(double spc[3]) //------------------------------------------------------------------------------ void LayerImageBase::SetNewSpacingLayer(double spc[3]) { - _newSpcLayer[0]=spc[0]; - _newSpcLayer[1]=spc[1]; - _newSpcLayer[2]=spc[2]; + _newSpcLayer[0] = spc[0]; + _newSpcLayer[1] = spc[1]; + _newSpcLayer[2] = spc[2]; _imageChangeInformation->SetOutputSpacing( _newSpcLayer ); } @@ -430,12 +431,10 @@ void LayerImageBase::onThreshold() double y=GetY(); double z=GetZ(); - x = x*_spcBase[0]; y = y*_spcBase[1]; z = z*_spcBase[2]; - CleanXYZ(x,y,z); vtkCamera *camera = _baseView->GetRenderer()->GetActiveCamera(); @@ -528,11 +527,15 @@ void LayerImageBase::onThreshold() _imageReslicer->SetInterpolationModeToNearestNeighbor(); _imageReslicer->Modified(); - +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 + // .. +#else + _imageReslicer->Update(); +#endif vtkImageData *img = _imageReslicer->GetOutput(); // img->Update(); // img->UpdateInformation(); - // _thresholdTable->Update(); //EED 2017-01-01 Migration VTK7 @@ -549,9 +552,9 @@ void LayerImageBase::onThreshold() #if VTK_MAJOR_VERSION <= 5 _thresholdActor->SetInput( _thresholdMapper->GetOutput() ); #else + _thresholdMapper->Update(); _thresholdActor->SetInputData( _thresholdMapper->GetOutput() ); #endif - _scalarbarActor->SetLookupTable( _thresholdTable ); // _scalarbarActor->SetLookupTable( _thresholdMapper->GetLookupTable() ); @@ -559,10 +562,7 @@ void LayerImageBase::onThreshold() _scalarbarActor->SetNumberOfLabels(4); int fontsize = _scalarbarActor->GetLabelTextProperty()->GetFontSize(); _scalarbarActor->GetLabelTextProperty()->SetFontSize(fontsize/2); - // _scalarbarActor->SetTextPad(4); ?? - - } // _image } @@ -612,7 +612,7 @@ void LayerImageBase::onThresholdRemove() baseView->GetRenderer()->RemoveActor( _scalarbarActor ); _actorPresent = false; - } + } // if _actorPresent } //---------------------------------------------------------------------------- @@ -637,7 +637,5 @@ void LayerImageBase::GetImageScalarRange() _range[1]=max; } - - // EOF