[Insight-users] How to turn on Debug.

Luis Ibanez luis.ibanez at kitware.com
Fri Jul 16 18:02:54 EDT 2004


Hi Yuanxin,

FLTK *IS NOT* required for printing out debug
information from ITK classes. We will be in
pretty bad shape if that were the case  :-)

ITK doesn *NOT DEPEND* on FLTK for any functionality.
FLTK is *only* used for some of the demo applications
in InsightApplications, and it is otherwise totally
unrelated to ITK.


What you need to do is to notify ITK that you
want that information to be printed out in
the console.

You will find many examples on how to do this
in the directory


    Insight/Testing/Code/Algorithms

it is more or less:


   #include "itkTextOutput.h"


   itk::OutputWindow::SetInstance(
        itk::TextOutput::New().GetPointer() );



After this, all debuggin messages will appear
in your console.


   Regards,


      Luis



------------------
Yuanxin Zhu wrote:

> Hi Luis,
> 
> Thank you for your quick support.
> 
> The file format I use is MRC which is quite popular in the cryo-electron
> microscopy community.  I do read through the Image IO part in the
> SoftwareGuide and understand the factory mechanism used for Image IO. I
> therefore wrote an MRCImageIO based on ImageIOBase.
> 
> I found that bug when I test the MRCImageIO. My test program was copy from
> Examples/IO/ImageReadExportVTK.cxx and then minimally revised.
> 
> I've just found the bug.  It turned out that I forgot to set the
> MRCImageIO object for the reader.  As you might remember, in the example
> program, only writer explicitly set the ImageIO object.
> 
> But, still, would FLTK is required for output ITK debug information?  I
> noticed that in itkDebugMacro, some kind of window's function is called.
> 
> Thank you.
> 
> Yuanxin
> 
> 
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------
> 
> On Fri, 16 Jul 2004, Luis Ibanez wrote:
> 
> 
>>Hi Yuanxin,
>>
>>This error message means that the fileformat you are
>>requesting for read or write is not one recognized
>>by ITK.
>>
>>
>>What is the filename that you provided to your application ?
>>
>>ITK uses the extension of the filename in order to select
>>the ImageIO object that actually reads the file.
>>
>>
>>Please look at the FAQ
>>
>>     http://www.itk.org/Wiki/index.php/Itk_FAQ
>>
>>
>>for the list of fileformats supported in ITK.
>>
>>http://www.itk.org/Wiki/index.php/Itk_FAQ#What_3D_file_formats_can_ITK_import_and_export.3F
>>
>>
>>
>>
>>   Regards,
>>
>>
>>
>>     Luis
>>
>>
>>-=======================
>>Yuanxin Zhu wrote:
>>
>>
>>>Hello, Everyone:
>>>
>>>My program ran into a exception "Could not create IO object for file...".
>>>I'd like to turn on the Debug flag so I could get more information about
>>>the bug. Would any of you give me a hint as to how to turn on the debug?
>>>In addition, would FLTK be required to do so? If so, which version of FLTK
>>>should be used?
>>>
>>>Thank you so much in advance.
>>>
>>>Yuanxin
>>>
>>>
>>>_______________________________________________
>>>Insight-users mailing list
>>>Insight-users at itk.org
>>>http://www.itk.org/mailman/listinfo/insight-users
>>>
>>
>>
>>
>>
> 
> 





More information about the Insight-users mailing list