[Insight-users] Questions about the DICOM file reading and writing
based on MFC
Karthik Krishnan
Karthik.Krishnan at kitware.com
Wed Feb 22 22:02:41 EST 2006
The answer is almost there in the warning message.
You have dynamic_casts in the code. You need the /GR flag (which enables
RTTI) to run the code properly. How you enable RTTI depends on the
VisualStudio version you are using. I don't have VS6, but I've heard on
VS6, there's some way to get to a GUI setting "Enable Run Time Type
Identification". Look around in Compiler settings etc...
HTH
-karthik
悦溪李 wrote:
> Hello,
> I am new in ITK, and I have some questions about the DICOM file
> reading and writing. I built a MFC project using VC++.NET and ITK.
> All the reading and writing codes are the same as what are given by
> itk example "DICOMImageReadWrite".
> However, when I comliped the project, it had no error but 36 warings
> like follows( they fall into two classfies):
> e:\InsightToolkit-2.4.0\Code\Common\itkEventObject.h(135) : warning
> C4541: 'dynamic_cast' used on polymorphic type 'itk::EventObject' with
> /GR-; unpredictable behavior may result
> ...
> e:\00lyx00\InsightToolkit-2.4.0\Code\Common\itkObjectFactory.h(51) :
> while compiling class-template member function
> 'itk::MutexLock::Pointer itk::ObjectFactory<T>::Create(void)'
> with
> [
> T=itk::MutexLock::Self
> ]
> e:\00lyx00\InsightToolkit-2.4.0\Code\Common\itkMutexLock.h(126) : see
> reference to class template instantiation 'itk::ObjectFactory<T>'
> being compiled
> with
> [
> T=itk::MutexLock::Self
> ]
> When I debuged the project step by step, it said "Unhandled exception
> at 0x77e8bbf3 in ITKFile.exe: Microsoft C++ exception:
> __non_rtti_object @ 0x0012ee8c." and the error message caught by
> itk::ExceptionObject was "Invalid output object type."
> I will appreciate to know how to solve it.
> Thanks for your time!
> Best wishes!
> Chris Lee
>
>------------------------------------------------------------------------
>
>_______________________________________________
>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