]> Creatis software - clitk.git/blob - common/vvImage.txx
add cache for read image
[clitk.git] / common / vvImage.txx
1 #include <itkImageToVTKImageFilter.h>
2
3 //--------------------------------------------------------------------
4 template<class TItkImageType>
5 void vvImage::AddItkImage(TItkImageType *input)
6 {
7   mImageDimension = TItkImageType::ImageDimension; 
8   typedef itk::ImageToVTKImageFilter <TItkImageType> ConverterType;
9   typename ConverterType::Pointer converter = ConverterType::New();
10   converter->SetInput(input);
11   converter->Update();
12
13   mItkToVtkConverters.push_back(dynamic_cast< itk::ProcessObject *>(converter.GetPointer()));
14   mVtkImages.push_back(converter->GetOutput());
15  
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) );
24 }
25 //--------------------------------------------------------------------
26