Hi Luis, <br><br>Thank you for your answer. <br>It probably was an incorrect build because it works well since I recompiled the entire library.<br>In fact, before that, I got some errors concerning the runtime machine choice. So I compiled several times ITK (erasing the old version).<br>
But the error disappeared when I rebuilt the project with CMake, and then recompiled it.<br><br>Thanks again,<br><br>Agnès<br><br><br><div class="gmail_quote">2010/3/23 Luis Ibanez <span dir="ltr"><<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi Agnes,<br>
<br>
<br>
Welcome to ITK !<br>
<br>
<br>
Thanks for the detailed report of the error that you are facing.<br>
<br>
<br>
This seems to be an unusual error.<br>
<br>
1) Can you please post to the list the filenames of the images<br>
that you are trying to read ?<br>
<br>
2) The actual error looks more like the result of an incorrect<br>
build. Can you please post to the list details about:<br>
<br>
a) The version of your compiler<br>
b) Version of ITK that you are using<br>
c) Compilation mode that you are using (Release/Debug?)<br>
d) Did you get ANY warnings at link time ?<br>
e) Are you building ITK as Shared libraries ?<br>
<br>
<br>
3) If (e) is true,<br>
Then,<br>
Any chance that you have multiple builds of ITK<br>
in your machine ?<br>
<br>
and that the application if finding old versions<br>
of the shared libraries ?<br>
<br>
<br>
Please let us know,<br>
<br>
<br>
Thanks<br>
<br>
<br>
Luis<br>
<br>
<br>
--------------------------------------------------------------------------------------------<br>
<div><div></div><div class="h5">On Mon, Mar 22, 2010 at 12:46 PM, Agnes Masson-Sibut<br>
<<a href="mailto:agnes.massonsibut@gmail.com">agnes.massonsibut@gmail.com</a>> wrote:<br>
> Hello everybody,<br>
><br>
> I am a new user of the Insight Toolkit, and I have issues to simply read and<br>
> write an image. When I try to execute the exemple ImageReadWrite, I get an<br>
> error inside the CreateImageIO function from itkImageIOFactory file :<br>
><br>
> ImageIOBase::Pointer<br>
> ImageIOFactory::CreateImageIO(const char* path, FileModeType mode)<br>
> {<br>
><br>
> RegisterBuiltInFactories();<br>
><br>
> std::list<ImageIOBase::Pointer> possibleImageIO;<br>
> std::list<LightObject::Pointer> allobjects =<br>
> ObjectFactoryBase::CreateAllInstance("itkImageIOBase");<br>
> for(std::list<LightObject::Pointer>::iterator i = allobjects.begin();<br>
> i != allobjects.end(); ++i)<br>
> {<br>
> ImageIOBase* io = dynamic_cast<ImageIOBase*>(i->GetPointer());<br>
> if(io)<br>
> {<br>
> possibleImageIO.push_back(io);<br>
> }<br>
> else<br>
> {<br>
> std::cerr << "Error ImageIO factory did not return an ImageIOBase: "<br>
> << (*i)->GetNameOfClass()<br>
> << std::endl;<br>
> }<br>
> }<br>
> for(std::list<ImageIOBase::Pointer>::iterator k = possibleImageIO.begin();<br>
> k != possibleImageIO.end(); ++k)<br>
> {<br>
> if( mode == ReadMode )<br>
> {<br>
> if((*k)->CanReadFile(path))<br>
> {<br>
> return *k;<br>
> }<br>
> }<br>
> else if( mode == WriteMode )<br>
> {<br>
> if(/*(*k)->CanWriteFile(path)*/false)<br>
> {<br>
> return *k;<br>
> }<br>
><br>
> }<br>
> ==> } Here, the list can't be deleted because of a memory issue<br>
> return 0;<br>
> }<br>
><br>
> It seems that the program isn't able to delete the list . Here is the call<br>
> list :<br>
><br>
> ntdll.dll!7c91120e()<br>
> ntdll.dll!7c97e139()<br>
> ntdll.dll!7c97e576()<br>
> ntdll.dll!7c9722e8()<br>
> kernel32.dll!7c85f9a7()<br>
> ImageReadWrite.exe!_CrtIsValidHeapPointer(const void *<br>
> pUserData=0x01790b58) Ligne 1807 C<br>
> ImageReadWrite.exe!_free_dbg_lk(void * pUserData=0x01790b58, int<br>
> nBlockUse=1) Ligne 1132 + 0x9 C<br>
> ImageReadWrite.exe!_free_dbg(void * pUserData=0x01790b58, int<br>
> nBlockUse=1) Ligne 1070 + 0xd C<br>
> ImageReadWrite.exe!operator delete(void * pUserData=0x01790b58) Ligne<br>
> 54 + 0x10 C++<br>
><br>
> ImageReadWrite.exe!std::allocator<std::_List_nod<itk::SmartPointer<itk::LightObject>,std::allocator<itk::SmartPointer<itk::LightObject><br>
>><br>
>>::_Node>::deallocate(std::_List_nod<itk::SmartPointer<itk::LightObject>,std::allocator<itk::SmartPointer<itk::LightObject><br>
>> >::_Node * _Ptr=0x01790b58, unsigned int __formal=1) Ligne 132 + 0x9<br>
> C++<br>
><br>
> ImageReadWrite.exe!std::list<itk::SmartPointer<itk::LightObject>,std::allocator<itk::SmartPointer<itk::LightObject><br>
>> >::clear() Ligne 622 C++<br>
><br>
> ImageReadWrite.exe!std::list<itk::SmartPointer<itk::LightObject>,std::allocator<itk::SmartPointer<itk::LightObject><br>
>> >::_Tidy() Ligne 931 C++<br>
><br>
> ImageReadWrite.exe!std::list<itk::SmartPointer<itk::LightObject>,std::allocator<itk::SmartPointer<itk::LightObject><br>
>><br>
>>::~list<itk::SmartPointer<itk::LightObject>,std::allocator<itk::SmartPointer<itk::LightObject><br>
>> >() Ligne 366 C++<br>
> ImageReadWrite.exe!itk::ImageIOFactory::CreateImageIO(const char *<br>
> path=0x00382a44, itk::ImageIOFactory::FileModeType mode=ReadMode) Ligne 75<br>
> + 0x26 C++<br>
><br>
> ImageReadWrite.exe!itk::ImageFileReader<itk::Image<short,2>,itk::DefaultConvertPixelTraits<short><br>
>>::GenerateOutputInformation() Ligne 118 + 0x1d C++<br>
> ITKCommon.dll!itk::ProcessObject::UpdateOutputInformation() Ligne 751<br>
> + 0x10 C++<br>
> ImageReadWrite.exe!itk::ImageBase<2>::UpdateOutputInformation() Ligne<br>
> 226 + 0x3e C++<br>
> ITKCommon.dll!itk::DataObject::Update() Ligne 342 + 0xd C++<br>
> ITKCommon.dll!itk::ProcessObject::Update() Ligne 615 + 0x1a C++<br>
> ImageReadWrite.exe!main(int argc=3, char * * argv=0x003939a0) Ligne<br>
> 164 + 0x1e C++<br>
> ImageReadWrite.exe!mainCRTStartup() Ligne 259 + 0x19 C<br>
> kernel32.dll!7c817077()<br>
> ntdll.dll!7c925d47()<br>
><br>
> I tried with different image types, but the result is the same. Is the bug<br>
> known ? Is there something I can do to help the thing working out ?<br>
><br>
> Thanks a lot,<br>
><br>
><br>
> --<br>
> Agnès Masson-Sibut<br>
> Étudiante au doctorat<br>
> Lissi, Université Paris Est Créteil<br>
> Aesculap SAS, Dpt R&D Software<br>
> tél : 06-73-60-52-91<br>
><br>
</div></div><div><div></div><div class="h5">> _____________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
><br>
><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Agnès Masson-Sibut<br>Étudiante au doctorat<br>Lissi, Université Paris Est Créteil<br>Aesculap SAS, Dpt R&D Software<br>tél : 06-73-60-52-91<br>