X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvSlicer.cxx;h=b9fe7a1f0944e26ea08bb874a1a85ad608ff802c;hb=72c516346c3a550e2d34a7635f5f41061a16306c;hp=317dc0670f411f54cea1c6f9cb57139aa1c045a8;hpb=3a823a03d4a2217e41e4dd3b05a8ea825bb762a5;p=clitk.git diff --git a/vv/vvSlicer.cxx b/vv/vvSlicer.cxx index 317dc06..b9fe7a1 100644 --- a/vv/vvSlicer.cxx +++ b/vv/vvSlicer.cxx @@ -128,7 +128,7 @@ vvSlicer::vvSlicer() #if VTK_MAJOR_VERSION <= 5 pdm->SetInput(crossCursor->GetOutput()); #else - pdm->SetInputData(crossCursor->GetOutput()); + pdm->SetInputConnection(crossCursor->GetOutputPort(0)); #endif pdmA = vtkSmartPointer::New(); @@ -422,7 +422,6 @@ void vvSlicer::SetOverlay(vvImage::Pointer overlay) #else mOverlayReslice->SetInputData(0, mOverlay->GetFirstVTKImageData()); #endif - mImageReslice->UpdateInformation(); mOverlayReslice->Update(); if (!mOverlayMapper) @@ -430,7 +429,7 @@ void vvSlicer::SetOverlay(vvImage::Pointer overlay) #if VTK_MAJOR_VERSION <= 5 mOverlayMapper->SetInput(mOverlayReslice->GetOutput()); #else - mOverlayMapper->SetInputData(mOverlayReslice->GetOutput()); + mOverlayMapper->SetInputConnection(mOverlayReslice->GetOutputPort(0)); #endif if (!mOverlayActor) { @@ -503,7 +502,7 @@ void vvSlicer::SetFusion(vvImage::Pointer fusion, int fusionSequenceCode) #if VTK_MAJOR_VERSION <= 5 mFusionMapper->SetInput(mFusionReslice->GetOutput()); #else - mFusionMapper->SetInputData(mFusionReslice->GetOutput()); + mFusionMapper->SetInputConnection(mFusionReslice->GetOutputPort(0)); #endif if (!mFusionActor) { @@ -840,7 +839,6 @@ void vvSlicer::SetTSlice(int t, bool updateLinkedImages) #else mOverlayReslice->SetInputData( mOverlay->GetVTKImages()[mCurrentOverlayTSlice] ); #endif - // Update overlay transform mConcatenatedOverlayTransform->Identity(); mConcatenatedOverlayTransform->Concatenate(mOverlay->GetTransform()[mCurrentOverlayTSlice]); @@ -1096,9 +1094,8 @@ void vvSlicer::UpdateDisplayExtent() // Image actor this->ImageActor->SetVisibility(mImageVisibility); -#if VTK_MAJOR_VERSION <= 5 this->ImageActor->SetDisplayExtent(w_ext); -#else +#if VTK_MAJOR_VERSION >= 6 vtkSmartPointer mapperOpenGL= vtkSmartPointer::New(); try { mapperOpenGL = dynamic_cast(GetImageActor()->GetMapper()); @@ -1109,14 +1106,12 @@ void vvSlicer::UpdateDisplayExtent() } if (mFirstSetSliceOrientation) { copyExtent(ext, mRegisterExtent); - this->ImageActor->SetDisplayExtent(w_ext); //initialisation } else { int w_croppingRegion[6]; copyExtent(mRegisterExtent, w_croppingRegion); - this->ImageActor->SetDisplayExtent(w_ext); w_croppingRegion[ this->SliceOrientation*2 ] = this->Slice; w_croppingRegion[ this->SliceOrientation*2+1 ] = this->Slice; - mapperOpenGL->SetCroppingRegion(w_croppingRegion); + mapperOpenGL->SetCroppingRegion(w_croppingRegion); } #endif @@ -1133,7 +1128,7 @@ void vvSlicer::UpdateDisplayExtent() #if VTK_MAJOR_VERSION <= 5 bool out = ClipDisplayedExtent(overExtent, mOverlayMapper->GetInput()->GetWholeExtent()); #else - bool out = ClipDisplayedExtent(overExtent, mOverlayMapper->GetInput()->GetInformation()->Get(vtkDataObject::DATA_EXTENT())); + bool out = ClipDisplayedExtent(overExtent, this->GetExtent()); #endif mOverlayActor->SetVisibility(!out); mOverlayActor->SetDisplayExtent( overExtent ); @@ -1153,7 +1148,7 @@ void vvSlicer::UpdateDisplayExtent() #if VTK_MAJOR_VERSION <= 5 bool out = ClipDisplayedExtent(fusExtent, mFusionMapper->GetInput()->GetWholeExtent()); #else - bool out = ClipDisplayedExtent(fusExtent, mFusionMapper->GetInput()->GetInformation()->Get(vtkDataObject::DATA_EXTENT())); + bool out = ClipDisplayedExtent(fusExtent, this->GetExtent()); #endif mFusionActor->SetVisibility(!out); mFusionActor->SetDisplayExtent( fusExtent ); @@ -1549,7 +1544,7 @@ void vvSlicer::GetExtremasAroundMousePointer(double & min, double & max, vtkImag #if VTK_MAJOR_VERSION <= 5 accFilter->SetInput(voiFilter->GetOutput()); #else - accFilter->SetInputData(voiFilter->GetOutput()); + accFilter->SetInputConnection(voiFilter->GetOutputPort(0)); #endif accFilter->Update();