[Insight-users] Cannot include file itkImageToVTKImageFilter.h

Kevin H. Hobbs hobbsk at ohiou.edu
Wed Sep 27 10:10:51 EDT 2006


On Wed, 2006-09-27 at 10:19 +0200, Prename Surname wrote:
> 
> So i found out that i need the insightapplications in order to get
> these h-files.
>  
> I then downloaded insightapplications and wantd to install. Now i then
> find out that i need some FLTK library and q2 library also.
>  

You shouldn't need to build ALL of insight applications, and maybe you
don't need to build any of it. *.txx aren't compiled until you compile
your program so I think you should be able to just copy the header and
template to your project directory and build them there.

There's also InsightApplications/vtkITK/Common/vtkITKUtility.h that does
almost the same thing but in a single header file you can just include.
You can just copy it or add it to the include path in your
CMakeLists.txt with :

INCLUDE_DIRECTORIES(
        ${series_SOURCE_DIR}
        ${WHEREVER_THE_HECK_YOU_PUT}/InsightApplications/vtkITK/Common
        )

You use it with :

	// VTK Image Reader
	vtkXMLImageDataReader * reader 
		= vtkXMLImageDataReader::New();
	reader->SetFileName( input_image_file );	
	
	// VTK Export
	vtkImageExport * vtk_export = vtkImageExport::New();
	vtk_export->SetInputConnection( reader->GetOutputPort() );

	// ITK Import
	typedef itk::VTKImageImport< FloatImageType > ITKImportType;
	ITKImportType::Pointer itk_import = ITKImportType::New();
	
	ConnectPipelines( vtk_export, itk_import );
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://public.kitware.com/pipermail/insight-users/attachments/20060927/a7915e06/attachment.pgp


More information about the Insight-users mailing list