[Insight-users] Cannot include file itkImageToVTKImageFilter.h

Prename Surname bsd.diverse at gmail.com
Wed Sep 27 14:30:12 EDT 2006


I managed to build the insightapplications, and i now want to be able to use
them just as easy as i can use the VTK and ITK. But i cannot seem to figure
out how to make the CMakeLists.txt so that i can also include the whole
Insightapplications, like it is done with ITK and VTK.
My CMakeLists.txt looks like this now


PROJECT(Hello)

FIND_PACKAGE(ITK)
IF (ITK_FOUND)
 INCLUDE(${USE_ITK_FILE})
ENDIF(ITK_FOUND)

FIND_PACKAGE(VTK)
IF(VTK_FOUND)
 INCLUDE( ${USE_VTK_FILE} )
ENDIF(VTK_FOUND)

INCLUDE_DIRECTORIES(
 ${Hello_SOURCE_DIR}
)
ADD_EXECUTABLE(Hello main.cxx)
TARGET_LINK_LIBRARIES (Hello
 ITKBasicFilters ITKCommon ITKIO
 vtkRendering vtkGraphics vtkHybrid
 vtkImaging vtkIO vtkFiltering vtkCommon
 )

So i think somehow i need to make a INSIGHT package as well like ITK and
VTK. But how is this done?

Many regards

2006/9/27, Kevin H. Hobbs <hobbsk at ohiou.edu>:
>
> 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 --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20060927/f3b4d7c8/attachment.htm


More information about the Insight-users mailing list