[ITK-users] Error converting ITK to VTK

Bill Lorensen bill.lorensen at gmail.com
Fri May 22 15:46:02 EDT 2015


What does your CMakeLists.txt look like?


On Fri, May 22, 2015 at 3:43 PM, viana <vianamp at gmail.com> wrote:
> This is what my current code looks like:
>
> #include <itkImage.h>
> #include <vtkPNGReader.h>
> #include <vtkImageData.h>
> #include <vtkTIFFReader.h>
> #include <vtkSmartPointer.h>
> #include <itkVTKImageToImageFilter.h>
> #include <itkFFTConvolutionImageFilter.h>
> #include <itkSimpleFilterWatcher.h>
> #include <itkConvolutionImageFilter.h>
> #include <itkImageFileReader.h>
> #include <itkImageFileWriter.h>
> #include <itkImageToVTKImageFilter.h>
>
>
> int main(int argc, char*argv[]) {
>
>   const int dim = 3;
>
>   typedef unsigned char PType;
>   typedef itk::Image< PType, dim > IType;
>   typedef itk::ImageToVTKImageFilter<IType> ITK2VTK;
>
>   typedef itk::ImageFileReader< IType > ReaderType;
>   ReaderType::Pointer reader = ReaderType::New();
>   reader->SetFileName( argv[1] );
>
>   ReaderType::Pointer reader2 = ReaderType::New();
>   reader2->SetFileName( argv[2] );
>
>   typedef itk::FFTConvolutionImageFilter< IType > FFTConvolutionType;
>   FFTConvolutionType::Pointer conv = FFTConvolutionType::New();
>   conv->SetInput( reader->GetOutput() );
>   conv->SetKernelImage( reader2->GetOutput() );
>
>   ITK2VTK::Pointer Filter = ITK2VTK::New();
>   Filter -> SetInput(conv->GetOutput());
>   Filter -> Update();
>
> return 0;
>
> }
>
>
>
> --
> View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Error-converting-ITK-to-VTK-tp7587392p7587394.html
> Sent from the ITK Insight Users mailing list archive at Nabble.com.
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-users



-- 
Unpaid intern in BillsBasement at noware dot com


More information about the Insight-users mailing list