[Insight-users] Re: InsightToolkit-2.0.0\Examples\DataRepresentation\Image compile problem

Luis Ibanez luis.ibanez at kitware.com
Mon Feb 28 19:25:41 EST 2005


Hi Albert,

You are probably using a filename that is not
associated to any of the image fileformats
recognized by ITK.


Please look at the FAQ

       http://www.itk.org/Wiki/Itk_FAQ

for a full list of the fileformat (and filename extensions)
currently supported in ITK:

http://www.itk.org/Wiki/Itk_FAQ#What_3D_file_formats_can_ITK_import_and_export.3F



When ITK doesn't recognize a fileformat, it throws
and exception. If you don't catch the exception,
your program will abort (actually printing out
an "abort" message).

Please look at the tutorial sessions

http://www.itk.org/HTML/Tutorials.htm

in particular to:
http://www.itk.org/CourseWare/Training/GettingStartedI-WebPage/img0.html

for instructions on how to catch ITK exceptions.

Similar instructions can be found in the ITK Software Guide


    http://www.itk.org/ItkSoftwareGuide.pdf



You should actually write something like

   ImageRegistration1.exe   img1.PNG   img2.JPG  outimg.HDR


for registering a PNG image with a JPG image and saving
the result in an Analyze image fileformat.



  Regards,


      Luis


------------------------------------------------
Wang, Albert/Sloan-Kettering Institute wrote:
> Hi Luis;
> 
> Thanks a lot for your info.  Now I changed CMakeLists.txt file and it
> works.  I compiled \examples\registration folder and want to run
> ImageRegistration1.cxx. When I run, I use 
> 
> ImageRegistration1.exe img1 img2 outimg
> 
> Error appears at fixedImageReader->Update().  It seems fixedImageReader
> does not have a function of Update().
> 
> I attached an error screen, please have a see it.
> 
> Thanks.
> 
> Albert
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Luis Ibanez [mailto:luis.ibanez at kitware.com] 
> Sent: Monday, February 28, 2005 2:45 PM
> To: Wang, Albert/Sloan-Kettering Institute
> Cc: Insight-users at itk.org
> Subject: Re: InsightToolkit-2.0.0\Examples\DataRepresentation\Image
> compile problem
> 
> 
> 
> Hi Albert,
> 
> The Examples in ITK are configured to be built along
> with the rest of the toolkit.
> 
> If you want to extract and example out of the ITK
> source tree and run it as an independent new project,
> you should create a new CMakeLists.txt file for it.
> 
> This is quite simply.
> Just follow the instructions in the tutorial session:
> 
> http://www.itk.org/CourseWare/Training/GettingStartedI-WebPage/img0.html
> 
> 
> 
> or the instructions in the ITK Software Guide:
> 
>     http://www.itk.org/ItkSoftwareGuide.pdf
> 
> 
> A typical example of the minimal CMakeLists.txt file
> is the one available at:
> 
> 
>     /Insight/Examples/Installation/CMakeLists.txt
> 
> 
> it contains the following text:
> 
> 
> PROJECT(HelloWorld)
> 
> # Find ITK.
> FIND_PACKAGE(ITK)
> IF(ITK_FOUND)
>    INCLUDE(${ITK_USE_FILE})
> ELSE(ITK_FOUND)
>    MESSAGE(FATAL_ERROR
>            "Cannot build without ITK.  Please set ITK_DIR.")
> ENDIF(ITK_FOUND)
> 
> ADD_EXECUTABLE(HelloWorld HelloWorld.cxx )
> 
> TARGET_LINK_LIBRARIES(HelloWorld ITKCommon)
> 
> 
> 
> 
> Please let us know if you have any further questions,
> 
> 
>     Thanks
> 
> 
>       Luis
> 
> 
> 
> ---------------------------------------------
> Wang, Albert/Sloan-Kettering Institute wrote:
> 
> 
>>Hi Luis;
>>
>>I am learning itk programming from examples program. I created a 
>>directory bin under 
>>InsightToolkit-2.0.0\Examples\DataRepresentation\Image to hold Cmake's
> 
> 
>>"where to hold binaries". In "where is the source code", I put 
>>InsightToolkit-2.0.0\Examples\DataRepresentation\Image.  Then click 
>>"configure" button and "OK" button.  Cmake works fine and created 
>>ImageExamples.dsw.  Then I use VC++6  to compile, I got the following
>>error:
>>
>>--------------------Configuration: Image1 - Win32
>>Debug--------------------
>>Compiling...
>>Image1.cxx 
>>D:\Projects\Deform_Reg\itk2.0.0\InsightToolkit-2.0.0\Examples\DataRepr
>>es
>>entation\Image\Image1.cxx(33) : fatal error C1083: Cannot open include
>>file: 'itkImage.h': No such file or directory
>>Error executing cl.exe.
>>
>>ALL_BUILD - 1 error(s), 0 warning(s)
>>
>>Can you tell me why?
>>
>>Thanks.
>>
>>Albert
>>
>>
>>
>>
>>
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 





More information about the Insight-users mailing list