From: tbaudier Date: Mon, 7 Dec 2015 08:39:49 +0000 (+0100) Subject: Debug VF Display X-Git-Tag: v1.4.0~89^2~2 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;ds=sidebyside;h=497b43ba71928bc54a8d3c1274fda2551cdd6484;hp=983237a103bc281b62a06f7c03507115d6c240f5;p=clitk.git Debug VF Display --- diff --git a/vv/vvSlicer.cxx b/vv/vvSlicer.cxx index c7e5e02..b6e343c 100644 --- a/vv/vvSlicer.cxx +++ b/vv/vvSlicer.cxx @@ -583,7 +583,7 @@ void vvSlicer::SetVF(vvImage::Pointer vf) mAAFilter->SetInput(mVOIFilter->GetOutput()); #else mVOIFilter->SetInputData(vf->GetFirstVTKImageData()); - mAAFilter->SetInputData(mVOIFilter->GetOutput()); + mAAFilter->SetInputConnection(mVOIFilter->GetOutputPort()); #endif ///This tells VTK to use the scalar (pixel) data of the image to draw the little arrows mAAFilter->Assign(vtkDataSetAttributes::SCALARS, vtkDataSetAttributes::VECTORS, vtkAssignAttribute::POINT_DATA); @@ -601,8 +601,8 @@ void vvSlicer::SetVF(vvImage::Pointer vf) mGlyphFilter->SetInput(mAAFilter->GetOutput()); mGlyphFilter->SetSource(mArrow->GetOutput()); #else - mGlyphFilter->SetInputData(mAAFilter->GetOutput()); - mGlyphFilter->SetSourceData(mArrow->GetOutput()); + mGlyphFilter->SetInputConnection(mAAFilter->GetOutputPort()); + mGlyphFilter->SetSourceConnection(mArrow->GetOutputPort()); #endif mGlyphFilter->ScalingOn(); mGlyphFilter->SetScaleModeToScaleByVector(); @@ -624,7 +624,7 @@ void vvSlicer::SetVF(vvImage::Pointer vf) #if VTK_MAJOR_VERSION <= 5 mVFMapper->SetInput(mGlyphFilter->GetOutput()); #else - mVFMapper->SetInputData(mGlyphFilter->GetOutput()); + mVFMapper->SetInputConnection(mGlyphFilter->GetOutputPort()); #endif mVFMapper->ImmediateModeRenderingOn(); mVFMapper->SetLookupTable(mVFColorLUT); @@ -1188,17 +1188,18 @@ void vvSlicer::UpdateDisplayExtent() #if VTK_MAJOR_VERSION <= 5 bool out = ClipDisplayedExtent(vfExtent, mVOIFilter->GetInput()->GetWholeExtent()); #else - bool out = ClipDisplayedExtent(vfExtent, mVOIFilter->GetInput()->GetInformation()->Get(vtkDataObject::DATA_EXTENT())); + bool out = ClipDisplayedExtent(vfExtent, this->GetExtent()); #endif mVFActor->SetVisibility(!out); mVOIFilter->SetVOI(vfExtent); int orientation[3] = {1,1,1}; orientation[this->SliceOrientation] = 0; mGlyphFilter->SetOrientation(orientation[0], orientation[1], orientation[2]); - mVFMapper->Update(); - position[this->SliceOrientation] += offset; mVFActor->SetPosition(position); + mVFActor->GetProperty()->SetOpacity(0.995); + mVFMapper->Update(); + } else if(mVF) mVFActor->SetVisibility(false);