[Insight-users] Cannot debug projects of ITKApplication.
Luis Ibanez
luis.ibanez at kitware.com
Mon Jul 23 08:35:45 EDT 2007
Hi Jimmy,
You should have mentioned from the beginning that you
were attempting to read a RAW image file.
You *CANNOT* read a RAW image file
directly with the ImageFileReader.
You have the following options:
a) Create a MetaImage header for the RAW file.
b) Use explicitly the RAWImageIO class in your code.
>From these two options, method (a) is the recommended one
because method (b) results in hard-coding the image
parameters in your program.
The easiest way of creating a MetaImage header for your
raw image is to use the program:
InsightApplications/MetaImageImporter
It is a command-line dialog that will guide you through
the process by asking you questions about your image.
The filename extension of your MetaImage header must be
".mhd".
Once you have created this header, you can pass it as
the filename to be read by the ImageFileReader.
Regards,
Luis
============================
jimmy wrote:
> Here is an example of this problem:
>
> I use itk::ImageFileReader [reader] to read a Raw data. After the file name is set, and it runs to
> [reader]->Update(); Error occurs.
>
> The following is call stack of Debugger:
>
> itk::ImageIOFactory::CreateImageIO(const char * path=0x0139d870, itk::ImageIOFactory::FileModeType mode=ReadMode) Line75 + 0x57
> if((*k)->CanReadFile(path))
> {
> return *k;
> }
>
> itk::ImageFileReader<itk::Image<unsigned short,2>,itk::DefaultConvertPixelTraits<unsigned short> >::GenerateOutputInformation() Line109 + 0x27
> ITKCommon.dll!itk::ProcessObject::UpdateOutputInformation() Line760
> itk::ImageBase<2>::UpdateOutputInformation() Line177 + 0x3e
> ITKCommon.dll!itk::DataObject::Update() Line343
>
>
> Thanks in advance.
> ------------------
> jimmy
> 2007-07-23
>
> -------------------------------------------------------------
> 发件人:Luis Ibanez
> 发送日期:2007-07-22 22:57:00
> 收件人:jimmy
> 抄送:insight-users
> 主题:Re: [Insight-users] Cannot debug projects of ITKApplication.
>
> Hi Jimmy,
>
> Can you look at the call stack in the debugger ?
>
> Could you trace what is the ITK file, and line
> that is triggering the error ?
>
> Please let us know,
>
>
> Thanks
>
>
> Luis
>
>
> ----------------
> jimmy wrote:
>
>>Hi, everyone.
>>
>>I have met a very strange problem when using ITKApplication:
>>I cannot debug or run Applications (e.g. ImageRegistration2D ,IntensityBased2D3DRegistration ) under the DEBUG mode in VS 2003.
>>Here is the Error message:
>>"
>>Debug Assertion Failed!
>>Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)
>>"
>>at [m_FixedImageReader or other object]->Update();
>>
>>On the contrary, the project can be run very smoothly under RELEASE mode.
>>
>>Can anyone help me? Thanks in advance.
>>
>>--------------
>>jimmy
>>2007-07-21
>>
>>
>>_______________________________________________
>>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