1 #include <itkImageToVTKImageFilter.h>
3 //--------------------------------------------------------------------
4 template<class TItkImageType>
5 void vvImage::AddItkImage(TItkImageType *input)
7 mImageDimension = TItkImageType::ImageDimension;
8 typedef itk::ImageToVTKImageFilter <TItkImageType> ConverterType;
9 typename ConverterType::Pointer converter = ConverterType::New();
10 converter->SetInput(input);
13 mItkToVtkConverters.push_back(dynamic_cast< itk::ProcessObject *>(converter.GetPointer()));
14 mVtkImages.push_back(converter->GetOutput());
16 //mVtkImageReslice.push_back(vtkSmartPointer<vtkImageReslice>::New());
17 //mVtkImageReslice.back()->SetInterpolationModeToLinear();
18 //mVtkImageReslice.back()->AutoCropOutputOn();
19 //mVtkImageReslice.back()->SetBackgroundColor(-1000,-1000,-1000,1);
20 //mVtkImageReslice.back()->SetResliceTransform(mTransform);
21 //mVtkImageReslice.back()->SetInput(0, image);
22 //mVtkImageReslice.back()->Update();
23 //mVtkImages.push_back( mVtkImageReslice.back()->GetOutput(0) );
25 //--------------------------------------------------------------------