<div>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.
</div>
<div>My CMakeLists.txt looks like this now</div>
<div> </div>
<div>
<p>PROJECT(Hello)</p>
<p>FIND_PACKAGE(ITK)<br>IF (ITK_FOUND)<br> INCLUDE(${USE_ITK_FILE})<br>ENDIF(ITK_FOUND)</p>
<p>FIND_PACKAGE(VTK)<br>IF(VTK_FOUND)<br> INCLUDE( ${USE_VTK_FILE} )<br>ENDIF(VTK_FOUND)</p>
<p>INCLUDE_DIRECTORIES(<br> ${Hello_SOURCE_DIR}<br>)<br>ADD_EXECUTABLE(Hello main.cxx) <br>TARGET_LINK_LIBRARIES (Hello <br> ITKBasicFilters ITKCommon ITKIO <br> vtkRendering vtkGraphics vtkHybrid <br> vtkImaging vtkIO vtkFiltering vtkCommon
<br> )</p></div>
<div><br>So i think somehow i need to make a INSIGHT package as well like ITK and VTK. But how is this done? </div>
<div> </div>
<div>Many regards</div>
<div> </div>
<div><span class="gmail_quote">2006/9/27, Kevin H. Hobbs <<a href="mailto:hobbsk@ohiou.edu">hobbsk@ohiou.edu</a>>:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">On Wed, 2006-09-27 at 10:19 +0200, Prename Surname wrote:<br>><br>> So i found out that i need the insightapplications in order to get
<br>> these h-files.<br>><br>> I then downloaded insightapplications and wantd to install. Now i then<br>> find out that i need some FLTK library and q2 library also.<br>><br><br>You shouldn't need to build ALL of insight applications, and maybe you
<br>don't need to build any of it. *.txx aren't compiled until you compile<br>your program so I think you should be able to just copy the header and<br>template to your project directory and build them there.<br><br>There's also InsightApplications/vtkITK/Common/vtkITKUtility.h that does
<br>almost the same thing but in a single header file you can just include.<br>You can just copy it or add it to the include path in your<br>CMakeLists.txt with :<br><br>INCLUDE_DIRECTORIES(<br> ${series_SOURCE_DIR}
<br> ${WHEREVER_THE_HECK_YOU_PUT}/InsightApplications/vtkITK/Common<br> )<br><br>You use it with :<br><br> // VTK Image Reader<br> vtkXMLImageDataReader * reader<br> = vtkXMLImageDataReader::New();
<br> reader->SetFileName( input_image_file );<br><br> // VTK Export<br> vtkImageExport * vtk_export = vtkImageExport::New();<br> vtk_export->SetInputConnection( reader->GetOutputPort() );<br>
<br> // ITK Import<br> typedef itk::VTKImageImport< FloatImageType > ITKImportType;<br> ITKImportType::Pointer itk_import = ITKImportType::New();<br><br> ConnectPipelines( vtk_export, itk_import );
<br><br><br></blockquote></div><br>