<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> I have written a simple program to write out a JPG image of input data. all is well and internediate results of my program are correct. However, when I try to write the jpg, then program crashes. Here is teh code snippet. Please suggest some tips to identify/correct the problem. The program crashes when Update() is called and program counter is in CreateImageIO function. The input image, 'mask' seems to be set correctly in the writer. Yet, the writer crashes. 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 mask) <br>{<br> typedef itk::Image<unsigned char, 2> InputImageType, UCharImageType; <br>
itk::ImageFileWriter<UCharImageType>::Pointer p_writer = itk::ImageFileWriter<UCharImageType>::New();<br> p_writer->SetFileName(filename);<br> p_writer->SetInput(mask);<br><br> itk::Image<unsigned char, 2>::PixelContainer * p_cont = 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]) << 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></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> Fri, July 16, 2010 9:00:33 AM<br><b><span style="font-weight:
bold;">Subject:</span></b> Insight-users Digest, Vol 75, Issue 29<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. 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></div></div>
</div><br>
</body></html>