]> Creatis software - clitk.git/commitdiff
Conversion from itk to vtk was catching exceptions for us => update itk pipeline...
authorsrit <srit>
Wed, 6 Apr 2011 11:28:15 +0000 (11:28 +0000)
committersrit <srit>
Wed, 6 Apr 2011 11:28:15 +0000 (11:28 +0000)
common/vvImage.txx

index a84fa76669d7a317655d725e9e2e8371fd8f133c..c3491f8be4e3d9497528317d107bff9eefbb5858 100755 (executable)
@@ -4,6 +4,10 @@
 template<class TItkImageType>
 void vvImage::AddItkImage(TItkImageType *input)
 {
+  // Update input before conversion to enable exceptions thrown by the ITK pipeline.
+  // Otherwise, vtkImageImport catches the exception for us.
+  input->Update();
+
   // Convert from ITK object to VTK object
   mImageDimension = TItkImageType::ImageDimension; 
   typedef itk::ImageToVTKImageFilter <TItkImageType> ConverterType;