[Insight-users] Re: question about image2.cxx : need to add command line arguments

Luis Ibanez luis.ibanez@kitware.com
Sun, 23 Mar 2003 10:48:28 -0500


Hi Zhao,

The message:

  "abnormal programm termination"

is not really produced during compilation.



It is probably the result of trying to
execute the program from within the
VisualStudio environment.

Note that this program, as most of the
examples in Insight/Examples, require
command line parameters. When you run
it directly from inside VisualStudio,
these expected parameters are not being
passed to the program.

---

You have two options:

1) Set the parameters in the

     "Project Settings"->"Debug"

   menu option of VisualStudio


or


2) Run the program from the console
   as a command line utility.



This program expects to receive as
argument the filename of a 2D image.
You can use any of the PNG images
provided in Insight/Examples/Data.




Regards,


 Luis


----------------------------
zhao yong qiang wrote:
> Hi Luis,
>    I meet such problem.
>    When I compile example image2.cxx, it shows the debug error(abnormal
> program termination).can u tell me the reason?
>   Cmakelist.txt:
>  PROJECT(Image2)
>  # 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(Image2 Image2.cxx ) TARGET_LINK_LIBRARIES(Image2 ITKCommon
> ITKIO)
>  
> Sincerely, 
> 
>                           Zhao Yongqiang
>                           Dept. of Computer Science & Engineering
>                           Shanghai JiaoTong University
>                           Shanghai, China
>                           zhao-yq@cs.sjtu.edu.cn
>