]> Creatis software - clitk.git/commitdiff
Debug VF Display
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Mon, 7 Dec 2015 08:39:49 +0000 (09:39 +0100)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Mon, 7 Dec 2015 08:39:49 +0000 (09:39 +0100)
vv/vvSlicer.cxx

index c7e5e027dd269d2b2b68b5e162d111c162f06776..b6e343cb8abaf8a16b60338bbb2819d197b2b563 100644 (file)
@@ -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);