X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FThresholdImageView%2FLayerImageBase.cxx;h=6f0d5e14b8d1747d126d032830d3f891dc7ec51b;hb=7030de3ff8576fd8111ad4d2cbb4335d169418b6;hp=c6d8465096bfd21a7ec43484e7ed82244e2eef78;hpb=1875ac5ea44f35fb7259e847f628bb840e3964a8;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 c6d8465..6f0d5e1 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx @@ -25,7 +25,7 @@ ColorLayerImageBasevtkInteractor::~ColorLayerImageBasevtkInteractor() //--------------------------------------------------------------------------------------------- bool ColorLayerImageBasevtkInteractor::OnMouseMove() { - + printf("EED ColorLayerImageBasevtkInteractor::OnMouseMove \n"); if (_vtkInteractorStyleBaseView->GetRefresh_waiting()==true) { _layerImageBase->GetvtkImageReslice()->Modified(); @@ -94,10 +94,14 @@ void LayerImageBase::SetImage(vtkImageData* image) //---------------------------------------------------------------------------- void LayerImageBase::SetwxVtkBaseView(wxVtkBaseView *baseview) { + printf("EED LayerImageBase::SetwxVtkBaseView start baseview:%p \n", baseview); + _baseView = baseview; vtkInteractorStyleBaseView *isbv = (vtkInteractorStyleBaseView*)(_baseView->GetInteractorStyleBaseView()); isbv->AddInteractorStyleMaracas( new ColorLayerImageBasevtkInteractor(this) ); + + printf("EED LayerImageBase::SetwxVtkBaseView end \n"); } //---------------------------------------------------------------------------- @@ -145,7 +149,9 @@ int LayerImageBase::CleanZ(int z) //---------------------------------------------------------------------------- void LayerImageBase::onThreshold() { - + + printf("EED LayerImageBase::onThreshold start \n"); + if ((_image!=NULL) && (_baseView!=NULL)) { int z=CleanZ( GetZ() ); @@ -168,7 +174,7 @@ void LayerImageBase::onThreshold() _thresholdActor = vtkImageActor::New( ); _thresholdActor->SetOpacity( 0.6 ); _thresholdActor->InterpolateOn( ); - _thresholdActor->SetPosition( 0,0, 900-1 ); + _thresholdActor->SetPosition( 0,0, -900-1 ); } // _thresholdActor _baseView->GetRenderer()->AddActor( _thresholdActor ); _actorPresent = true; @@ -179,7 +185,8 @@ void LayerImageBase::onThreshold() _imageReslicer->SetInformationInput( GetImage() ); _imageReslicer->SetResliceAxesDirectionCosines(1,0,0, 0,1,0 ,0,0,1); _imageReslicer->SetOutputDimensionality(2); - _imageReslicer->SetInterpolationModeToLinear(); +// _imageReslicer->SetInterpolationModeToLinear(); + _imageReslicer->SetInterpolationModeToNearestNeighbor(); _imageReslicer->SetResliceAxesOrigin(0,0,z); vtkImageData *img = _imageReslicer->GetOutput(); @@ -189,7 +196,12 @@ void LayerImageBase::onThreshold() _thresholdMapper->SetInput( img ); _thresholdMapper->SetLookupTable( _thresholdTable ); _thresholdActor->SetInput( _thresholdMapper->GetOutput() ); + + printf("EED LayerImageBase::onThreshold working \n"); + + } // _image + printf("EED LayerImageBase::onThreshold end"); }