]> Creatis software - clitk.git/commitdiff
Debug mouse pointer for VTK5
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Mon, 19 Dec 2016 13:14:37 +0000 (14:14 +0100)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Mon, 19 Dec 2016 13:14:37 +0000 (14:14 +0100)
vv/vvSlicer.cxx

index d1b6252056adc2b0dca70be2e008aeee76b7d0b6..46139cd75fa1b6d7bb3a3b66a0d873d25ee6cdbf 100644 (file)
@@ -359,6 +359,7 @@ void vvSlicer::SetImage(vvImage::Pointer image)
     mConcatenatedTransform->Concatenate(mImage->GetTransform()[0]);
     mConcatenatedTransform->Concatenate(mSlicingTransform);
     mImageReslice->SetResliceTransform(mConcatenatedTransform);
+    //mImageReslice->SetResliceAxes(mConcatenatedTransform->GetMatrix());
 #if VTK_MAJOR_VERSION <= 5
     mImageReslice->SetInput(0, mImage->GetFirstVTKImageData());
 #else
@@ -1664,12 +1665,12 @@ void vvSlicer::Render()
     double Y = (pt[1] - mImage->GetVTKImages()[mCurrentTSlice]->GetOrigin()[1])/mImage->GetVTKImages()[mCurrentTSlice]->GetSpacing()[1];
     double Z = (pt[2] - mImage->GetVTKImages()[mCurrentTSlice]->GetOrigin()[2])/mImage->GetVTKImages()[mCurrentTSlice]->GetSpacing()[2];
 #if VTK_MAJOR_VERSION <= 5
-    if (X >= this->GetInput()->GetWholeExtent()[0]-0.5 &&
-        X <= this->GetInput()->GetWholeExtent()[1]+0.5 &&
-        Y >= this->GetInput()->GetWholeExtent()[2]-0.5 &&
-        Y <= this->GetInput()->GetWholeExtent()[3]+0.5 &&
-        Z >= this->GetInput()->GetWholeExtent()[4]-0.5 &&
-        Z <= this->GetInput()->GetWholeExtent()[5]+0.5) {
+    if (X >= mImage->GetVTKImages()[mCurrentTSlice]->GetWholeExtent()[0]-0.5 &&
+        X <= mImage->GetVTKImages()[mCurrentTSlice]->GetWholeExtent()[1]+0.5 &&
+        Y >= mImage->GetVTKImages()[mCurrentTSlice]->GetWholeExtent()[2]-0.5 &&
+        Y <= mImage->GetVTKImages()[mCurrentTSlice]->GetWholeExtent()[3]+0.5 &&
+        Z >= mImage->GetVTKImages()[mCurrentTSlice]->GetWholeExtent()[4]-0.5 &&
+        Z <= mImage->GetVTKImages()[mCurrentTSlice]->GetWholeExtent()[5]+0.5) {
 #else
     if (X >= mImage->GetVTKImages()[mCurrentTSlice]->GetInformation()->Get(vtkDataObject::DATA_EXTENT())[0]-0.5 &&
         X <= mImage->GetVTKImages()[mCurrentTSlice]->GetInformation()->Get(vtkDataObject::DATA_EXTENT())[1]+0.5 &&