<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Hello All,<br><br> This is with regards to my previous question about writing to jpg. This code works fine in Release mode, but crashes in Debug. When I try to debug it, the program seems to crash in CreateImageIO module. Stepping through the code in release mode, I notice that the program does not even enter this module. Any tips on how I can debug this ? <br><br>Thank you for your time.<br>Emma.<br><br>Code snippet that crashes<br><br>void write_to_jpg(std::string filename, itk::Image<unsigned char,
2>::Pointer <br>mask) <br><br>{<br> typedef itk::Image<unsigned
char, 2> InputImageType, UCharImageType; <br>
itk::ImageFileWriter<UCharImageType>::Pointer p_writer = <br>itk::ImageFileWriter<UCharImageType>::New();<br>
p_writer->SetFileName(filename);<br>
p_writer->SetInput(mask);<br><br> try<br> {<br> p_writer->Update();<br>
}<br> catch(itk::ExceptionObject & err)<br> {<br>
std::cout<< "Writer Update failed:"<< std::endl;<br> }<br>}<br><br><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> "insight-users-request@itk.org" <insight-users-request@itk.org><br><b><span style="font-weight: bold;">To:</span></b> insight-users@itk.org<br><b><span style="font-weight: bold;">Sent:</span></b> Sat, July 17, 2010 5:47:19 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Insight-users Digest, Vol 75, Issue 31<br></font><br>
Send Insight-users mailing list submissions to<br> <a ymailto="mailto:insight-users@itk.org" href="mailto:insight-users@itk.org">insight-users@itk.org</a><br><br>To subscribe or unsubscribe via the World Wide Web, visit<br><span> <a target="_blank" href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a></span><br>or, via email, send a message with subject or body 'help' to<br> <a ymailto="mailto:insight-users-request@itk.org" href="mailto:insight-users-request@itk.org">insight-users-request@itk.org</a><br><br>You can reach the person managing the list at<br> <a ymailto="mailto:insight-users-owner@itk.org" href="mailto:insight-users-owner@itk.org">insight-users-owner@itk.org</a><br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of Insight-users digest..."<br><br><br>Today's
Topics:<br><br> 1. ImageFileWriter crashes in creatImageIO in Debug mode (Emma Ryan)<br> 2. CMake config problem: ITK + GDCM 2 + VTK (Roger Bramon Feixas)<br> 3. Re: CMake config problem: ITK + GDCM 2 + VTK (Karthik Krishnan)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Fri, 16 Jul 2010 20:58:42 -0700 (PDT)<br>From: Emma Ryan <<a ymailto="mailto:eryanvtk@yahoo.com" href="mailto:eryanvtk@yahoo.com">eryanvtk@yahoo.com</a>><br>Subject: [Insight-users] ImageFileWriter crashes in creatImageIO in<br> Debug mode<br>To: <a ymailto="mailto:insight-users@itk.org" href="mailto:insight-users@itk.org">insight-users@itk.org</a><br>Message-ID: <<a ymailto="mailto:532205.26358.qm@web57908.mail.re3.yahoo.com"
href="mailto:532205.26358.qm@web57908.mail.re3.yahoo.com">532205.26358.qm@web57908.mail.re3.yahoo.com</a>><br>Content-Type: text/plain; charset="us-ascii"<br><br>Hello All,<br><br> I have written a simple program to write out a JPG image of input data. all <br>is well and internediate results of my program are correct. However, when I try <br>to write the jpg, then program crashes. Here is teh code snippet. Please <br>suggest some tips to identify/correct the problem. The program crashes when <br>Update() is called and program counter is in CreateImageIO function. The input <br>image, 'mask' seems to be set correctly in the writer. Yet, the writer crashes. <br>All this works fine in Release mode. I am using VS 2005.<br><br><br>void write_to_jpg(std::string filename, itk::Image<unsigned char, 2>::Pointer <br>mask) <br><br>{<br> typedef itk::Image<unsigned char, 2> InputImageType, UCharImageType; <br>
itk::ImageFileWriter<UCharImageType>::Pointer p_writer = <br>itk::ImageFileWriter<UCharImageType>::New();<br> p_writer->SetFileName(filename);<br> p_writer->SetInput(mask);<br><br> itk::Image<unsigned char, 2>::PixelContainer * p_cont = <br>mask->GetPixelContainer();<br> unsigned char const * p_image_data = p_cont->GetImportPointer();<br> for(int ii = 0; ii < 10; ++ii)<br> for(int jj = 0; jj < 10; ++jj)<br> std::cout << ii << ", " << jj << ", " << int(p_image_data[ii*10+jj]) <br><< std::endl;<br><br> try<br> {<br> p_writer->Update();<br> }<br> catch(itk::ExceptionObject & err)<br> {<br> std::cout<< "Writer
Update failed:"<< std::endl;<br> }<br>}<br><br><br><br>Program crashes in :<br><br>std::list<LightObject::Pointer> allobjects =<br> ObjectFactoryBase::CreateAllInstance("itkImageIOBase");<br> for(std::list<LightObject::Pointer>::iterator i = allobjects.begin();<br><br><br>Thank you,<br>Emma<br><br><br><br><br><br>________________________________<br>From: "<a ymailto="mailto:insight-users-request@itk.org" href="mailto:insight-users-request@itk.org">insight-users-request@itk.org</a>" <<a ymailto="mailto:insight-users-request@itk.org" href="mailto:insight-users-request@itk.org">insight-users-request@itk.org</a>><br>To: <a ymailto="mailto:insight-users@itk.org" href="mailto:insight-users@itk.org">insight-users@itk.org</a><br>Sent: Fri, July 16, 2010 9:00:33 AM<br>Subject: Insight-users Digest, Vol 75, Issue 29<br><br>Send Insight-users mailing list submissions to<br> <a
ymailto="mailto:insight-users@itk.org" href="mailto:insight-users@itk.org">insight-users@itk.org</a><br><br>To subscribe or unsubscribe via the World Wide Web, visit<br> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>or, via email, send a message with subject or body 'help' to<br> <a ymailto="mailto:insight-users-request@itk.org" href="mailto:insight-users-request@itk.org">insight-users-request@itk.org</a><br><br>You can reach the person managing the list at<br> <a ymailto="mailto:insight-users-owner@itk.org" href="mailto:insight-users-owner@itk.org">insight-users-owner@itk.org</a><br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of Insight-users digest..."<br><br><br>Today's Topics:<br><br> 1. Re: Segmentation validation Curves, Spheres (Juan Cardelino)<br> 2. Re:
building contour trees (Reda, Fitsum A)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Fri, 16 Jul 2010 11:13:13 -0300<br>From: Juan Cardelino <<a ymailto="mailto:juan.cardelino@gmail.com" href="mailto:juan.cardelino@gmail.com">juan.cardelino@gmail.com</a>><br>Subject: Re: [Insight-users] Segmentation validation Curves, Spheres<br>To: elhadj meljane <<a ymailto="mailto:elhadj.meljane@gmail.com" href="mailto:elhadj.meljane@gmail.com">elhadj.meljane@gmail.com</a>><br>Cc: ITK Users <<a ymailto="mailto:insight-users@itk.org" href="mailto:insight-users@itk.org">insight-users@itk.org</a>><br>Message-ID:<br> <<a ymailto="mailto:AANLkTilymdEDPOg4y8Fz4CPPyL9O8AXzzymjgrfPLDWy@mail.gmail.com" href="mailto:AANLkTilymdEDPOg4y8Fz4CPPyL9O8AXzzymjgrfPLDWy@mail.gmail.com">AANLkTilymdEDPOg4y8Fz4CPPyL9O8AXzzymjgrfPLDWy@mail.gmail.com</a>><br>Content-Type: text/plain;
charset=UTF-8<br><br>Hi elhadj,<br> In the 2D case I know some works that, compare<br>segmentations, by either compare boundary maps or partitions. If your<br>ultimate goal is segmentation, I'm not sure if it is a good idea to<br>compare curves, I'd rather compare segmentations. Regarding boundary<br>comparison you can check the work of D. Martin at Berkeley, and a<br>benchmark system called Berkeley Segmentation Dataset or something<br>like that. Regarding the region based approach, you should check the<br>work of J. Cardoso, search for "Quantitative evaluation".<br>If you really want to compare curves, there's I know some work<br>comparing curves represented as distance maps, which compare them<br>modulo a rigid transformation.<br>I hope this helps.<br>Best regards,<br> Juan<br><br>On Wed, Jul 14, 2010 at 2:20 PM, elhadj meljane<br><<a
ymailto="mailto:elhadj.meljane@gmail.com" href="mailto:elhadj.meljane@gmail.com">elhadj.meljane@gmail.com</a>> wrote:<br>> Hi all,<br>> I'm looking for a tool to validate my segmentation results in 2D and 3D:<br>> ??- 2D: I have manual and automatic segmented curves<br>> ??- ?3D: I have a manual segmentation of a sphere-like structure and a<br>> simulated sphere like structure<br>><br>> I would like to know:<br>><br>> -? Do I have to choose manually a set of points on the manual and automatic<br>> ?? segmentation to compute a distance between the two sets (for example<br>> ?? housdorff distance)?<br>> - there is an itk tool (or a simplest way) that I can use it to validate the<br>> segmentation?<br>> ?? Thank you<br>> ?? Sincerely,<br>> H.<br>> _____________________________________<br>> Powered by <a target="_blank" href="http://www.kitware.com">www.kitware.com</a><br>><br>> Visit other
Kitware open-source projects at<br><span>> <a target="_blank" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a></span><br>><br>> Kitware offers ITK Training Courses, for more information visit:<br><span>> <a target="_blank" href="http://www.kitware.com/products/protraining.html">http://www.kitware.com/products/protraining.html</a></span><br>><br>> Please keep messages on-topic and check the ITK FAQ at:<br><span>> <a target="_blank" href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a></span><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><br><br>------------------------------<br><br>Message: 2<br>Date: Fri, 16 Jul 2010 11:10:51 -0400<br>From: "Reda, Fitsum A" <<a
ymailto="mailto:fitecx@gmail.com" href="mailto:fitecx@gmail.com">fitecx@gmail.com</a>><br>Subject: Re: [Insight-users] building contour trees<br>To: Liam Kurmos <<a ymailto="mailto:quantum.leaf@googlemail.com" href="mailto:quantum.leaf@googlemail.com">quantum.leaf@googlemail.com</a>>, insight-users<br> <<a ymailto="mailto:insight-users@itk.org" href="mailto:insight-users@itk.org">insight-users@itk.org</a>><br>Message-ID:<br> <<a ymailto="mailto:AANLkTin_6jaaUDcGcPs3Wgwhdvu5rQz8ogUZG8lViTUw@mail.gmail.com" href="mailto:AANLkTin_6jaaUDcGcPs3Wgwhdvu5rQz8ogUZG8lViTUw@mail.gmail.com">AANLkTin_6jaaUDcGcPs3Wgwhdvu5rQz8ogUZG8lViTUw@mail.gmail.com</a>><br>Content-Type: text/plain; charset=ISO-8859-1<br><br>On 7/13/10, Liam Kurmos <<a ymailto="mailto:quantum.leaf@googlemail.com" href="mailto:quantum.leaf@googlemail.com">quantum.leaf@googlemail.com</a>> wrote:<br>> Hi All,<br>><br>> I'm
wondering if anyone has experience of building Contour Trees (such<br><span>> as per <a target="_blank" href="http://citeseer.ist.psu.edu/carr99computing.html">http://citeseer.ist.psu.edu/carr99computing.html</a> ) from volume</span><br>> data? and if so whether there are any open source libraries for tree<br>> construction? I have looked at libtourtre<br><span>> <a target="_blank" href="http://graphics.cs.ucdavis.edu/%7Esdillard/libtourtre/doc/html/">http://graphics.cs.ucdavis.edu/~sdillard/libtourtre/doc/html/</a> but so</span><br>> far not had much success with getting it to work.<br>><br>> If anyone has any information of how to do it, please let me know.<br>><br>> Liam<br>> _____________________________________<br><span>> Powered by <a target="_blank" href="http://www.kitware.com">www.kitware.com</a></span><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>-- <br>Sent from my mobile device<br><br><br>------------------------------<br><br>_______________________________________________<br>Insight-users mailing list<br><a ymailto="mailto:Insight-users@itk.org"
href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><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>End of Insight-users Digest, Vol 75, Issue 29<br>*********************************************<br><br><br><br> <br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br><span>URL: <<a target="_blank" href="http://www.itk.org/pipermail/insight-users/attachments/20100716/d21053e3/attachment-0001.htm">http://www.itk.org/pipermail/insight-users/attachments/20100716/d21053e3/attachment-0001.htm</a>></span><br><br>------------------------------<br><br>Message: 2<br>Date: Sat, 17 Jul 2010 11:55:27 +0200<br>From: Roger Bramon Feixas <<a ymailto="mailto:rogerbramon@gmail.com" href="mailto:rogerbramon@gmail.com">rogerbramon@gmail.com</a>><br>Subject: [Insight-users] CMake config problem: ITK + GDCM 2 +
VTK<br>To: <a ymailto="mailto:insight-users@itk.org" href="mailto:insight-users@itk.org">insight-users@itk.org</a><br>Message-ID:<br> <<a ymailto="mailto:AANLkTimhNlVHsmoiyPOpuKr7oEL6JnQio-T2ElEC8ZjK@mail.gmail.com" href="mailto:AANLkTimhNlVHsmoiyPOpuKr7oEL6JnQio-T2ElEC8ZjK@mail.gmail.com">AANLkTimhNlVHsmoiyPOpuKr7oEL6JnQio-T2ElEC8ZjK@mail.gmail.com</a>><br>Content-Type: text/plain; charset="iso-8859-1"<br><br>Hi,<br><br>I have the same problem reported in this thread:<br><span><a target="_blank" href="http://www.itk.org/pipermail/insight-users/2010-March/035903.html">http://www.itk.org/pipermail/insight-users/2010-March/035903.html</a>, but any</span><br>solution was published. I would like to continue the discussion.<br><br>I'm trying to compile ITK 3.18 with GDCM 2.0.15. I compiled correctly GDCM<br>2.0.15 with VTK 5.6 but when I set to 1 the ITK_USE_SYSTEM_GDCM option this<br>CMake message error appears:<br><br>CMake Error at
Utilities/MetaIO/CMakeLists.txt:104 (INSTALL):<br> install TARGETS given no LIBRARY DESTINATION for shared library target<br> "vtkmetaio".<br><br><br>In the mentioned thread, Brad King proposed a test:<br><br>"<br>Edit ITK/Utilities/MetaIO/CMakeLists.txt to add some message()-s<br>in this top block:<br><br>IF(VTK_VERSION)<br> SET(METAIO_FOR_VTK 1)<br> MARK_AS_ADVANCED( METAIO_FOR_VTK )<br> SET(METAIO_NAMESPACE "vtkmetaio")<br> MESSAGE(FATAL_ERRORO "ITK IS NOT VTK!") # ADD THIS LINE<br>ELSE(VTK_VERSION)<br>...<br>ENDIF(VTK_VERSION)<br><br>Does CMake hit this? Are you pointing ITK at a VTK? "<br><br>I tested it, and yes, CMake hits this.<br><br>Anyone have any suggestion?<br><br>Thanks,<br><br>Roger<br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br><span>URL: <<a target="_blank"
href="http://www.itk.org/pipermail/insight-users/attachments/20100717/091cc5d6/attachment-0001.htm">http://www.itk.org/pipermail/insight-users/attachments/20100717/091cc5d6/attachment-0001.htm</a>></span><br><br>------------------------------<br><br>Message: 3<br>Date: Sat, 17 Jul 2010 18:17:16 +0530<br>From: Karthik Krishnan <<a ymailto="mailto:karthik.krishnan@kitware.com" href="mailto:karthik.krishnan@kitware.com">karthik.krishnan@kitware.com</a>><br>Subject: Re: [Insight-users] CMake config problem: ITK + GDCM 2 + VTK<br>To: Roger Bramon Feixas <<a ymailto="mailto:rogerbramon@gmail.com" href="mailto:rogerbramon@gmail.com">rogerbramon@gmail.com</a>><br>Cc: <a ymailto="mailto:insight-users@itk.org" href="mailto:insight-users@itk.org">insight-users@itk.org</a><br>Message-ID:<br> <<a ymailto="mailto:AANLkTikCI_aQG8zDXhApwqd_D92u0LiJsuMS8pW_--YE@mail.gmail.com"
href="mailto:AANLkTikCI_aQG8zDXhApwqd_D92u0LiJsuMS8pW_--YE@mail.gmail.com">AANLkTikCI_aQG8zDXhApwqd_D92u0LiJsuMS8pW_--YE@mail.gmail.com</a>><br>Content-Type: text/plain; charset="iso-8859-1"<br><br>Known issue.. See this<br><br><span> <a target="_blank" href="http://www.itk.org/pipermail/insight-users/2010-June/037360.html">http://www.itk.org/pipermail/insight-users/2010-June/037360.html</a></span><br><br>and<br><br><span> <a target="_blank" href="http://www.itk.org/pipermail/insight-users/2010-July/037404.html">http://www.itk.org/pipermail/insight-users/2010-July/037404.html</a></span><br><br>I think the consensus is to downgrade to CMake 2.6 from Cmake 2.8<br><br><br>On Sat, Jul 17, 2010 at 3:25 PM, Roger Bramon Feixas<br><<a ymailto="mailto:rogerbramon@gmail.com" href="mailto:rogerbramon@gmail.com">rogerbramon@gmail.com</a>>wrote:<br><br>> Hi,<br>><br>> I have the same problem reported in this thread:<br>> <a
href="http://www.itk.org/pipermail/insight-users/2010-March/035903.html" target="_blank">http://www.itk.org/pipermail/insight-users/2010-March/035903.html</a>, but any<br>> solution was published. I would like to continue the discussion.<br>><br>> I'm trying to compile ITK 3.18 with GDCM 2.0.15. I compiled correctly GDCM<br>> 2.0.15 with VTK 5.6 but when I set to 1 the ITK_USE_SYSTEM_GDCM option this<br>> CMake message error appears:<br>><br>> CMake Error at Utilities/MetaIO/CMakeLists.txt:104 (INSTALL):<br>> install TARGETS given no LIBRARY DESTINATION for shared library target<br>> "vtkmetaio".<br>><br>><br>> In the mentioned thread, Brad King proposed a test:<br>><br>> "<br>> Edit ITK/Utilities/MetaIO/CMakeLists.txt to add some message()-s<br>> in this top block:<br>><br>> IF(VTK_VERSION)<br>> SET(METAIO_FOR_VTK 1)<br>> MARK_AS_ADVANCED( METAIO_FOR_VTK
)<br>> SET(METAIO_NAMESPACE "vtkmetaio")<br>> MESSAGE(FATAL_ERRORO "ITK IS NOT VTK!") # ADD THIS LINE<br>> ELSE(VTK_VERSION)<br>> ...<br>> ENDIF(VTK_VERSION)<br>><br>> Does CMake hit this? Are you pointing ITK at a VTK? "<br>><br>> I tested it, and yes, CMake hits this.<br>><br>> Anyone have any suggestion?<br>><br>> Thanks,<br>><br>> Roger<br>><br>> _____________________________________<br><span>> Powered by <a target="_blank" href="http://www.kitware.com">www.kitware.com</a></span><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>-------------- next part --------------<br>An HTML attachment was scrubbed...<br><span>URL: <<a target="_blank" href="http://www.itk.org/pipermail/insight-users/attachments/20100717/b3ad9e8f/attachment.htm">http://www.itk.org/pipermail/insight-users/attachments/20100717/b3ad9e8f/attachment.htm</a>></span><br><br>------------------------------<br><br>_______________________________________________<br>Insight-users mailing list<br><a ymailto="mailto:Insight-users@itk.org"
href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><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>End of Insight-users Digest, Vol 75, Issue 31<br>*********************************************<br></div></div>
</div><br>
</body></html>