<div>Hello,</div>
<div>&nbsp;</div>
<div>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.</div>
<div>All the reading and writing codes are the same as what are given by itk example &quot;DICOMImageReadWrite&quot;.</div>
<div>&nbsp;</div>
<div>However, when I comliped the project, it had no error but 36 warings like follows( they fall into two classfies):</div>
<div>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</div>
<div>...</div>
<div>e:\00lyx00\InsightToolkit-2.4.0\Code\Common\itkObjectFactory.h(51) : while compiling class-template member function 'itk::MutexLock::Pointer itk::ObjectFactory&lt;T&gt;::Create(void)'<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; with<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; T=itk::MutexLock::Self<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; e:\00lyx00\InsightToolkit-2.4.0\Code\Common\itkMutexLock.h(126) : see reference to class template instantiation 'itk::ObjectFactory&lt;T&gt;' being compiled<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; with
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; T=itk::MutexLock::Self<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]<br>&nbsp;</div>
<div>When I debuged the project step by step,&nbsp; it said &quot;Unhandled exception at 0x77e8bbf3 in ITKFile.exe: Microsoft C++ exception: __non_rtti_object @ 0x0012ee8c.&quot; and the error message caught&nbsp;by itk::ExceptionObject was &quot;Invalid output object type.&quot;
</div>
<div>&nbsp;</div>
<div>I will&nbsp;appreciate to know how to solve it.</div>
<div>&nbsp;</div>
<div>Thanks for your time!</div>
<div>&nbsp;</div>
<div>Best wishes!</div>
<div>&nbsp;</div>
<div>Chris Lee</div>