<br>Hi Juliette,<br><br>Here are three options for you to get the file<br>of this new example:<br><br>A)  Do a CVS checkout of ITK<br>     <a href="http://www.itk.org/ITK/resources/software.html">http://www.itk.org/ITK/resources/software.html</a><br>
<br>or<br><br><br>B)  Get the file through the Web CVS interface:<br><a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/Examples/SpatialObjects/BoundingBoxFromImageMaskSpatialObject.cxx?root=Insight&amp;sortby=date&amp;sortdir=down&amp;view=log">http://public.kitware.com/cgi-bin/viewcvs.cgi/Examples/SpatialObjects/BoundingBoxFromImageMaskSpatialObject.cxx?root=Insight&amp;sortby=date&amp;sortdir=down&amp;view=log</a><br>
you could use this direct link:<br><a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Examples/SpatialObjects/BoundingBoxFromImageMaskSpatialObject.cxx?revision=1.1&amp;root=Insight">http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Examples/SpatialObjects/BoundingBoxFromImageMaskSpatialObject.cxx?revision=1.1&amp;root=Insight</a><br>
<br><br>or<br><br><br>C) Get it as the attachment of this email     :-)<br><br><br><br>     Regards,<br><br><br>              Luis<br><br><br><br>-------------------------------------<br><div class="gmail_quote">On Mon, Oct 26, 2009 at 12:25 PM, Juliette Deniau <span dir="ltr">&lt;<a href="mailto:juliette.deniau@yahoo.fr">juliette.deniau@yahoo.fr</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">
<div><span style="font-size: 10pt;">Thank you Luis for adding the required example. However, how can I do to access this file?</span></div>
<div><span style="font-size: 10pt;">Shall I download the latest version or is there any fastest method to get this file?</span></div>
<div><span style="font-size: 10pt;">Sorry for my silly question!</span></div>
<div><span style="font-size: 10pt;">Thanks </span></div>
<div><span style="font-size: 10pt;">Juliette</span></div>
<div><br><br>--- En date de : <b>Mer 21.10.09, Luis Ibanez <i>&lt;<a href="mailto:luis.ibanez@kitware.com" target="_blank">luis.ibanez@kitware.com</a>&gt;</i></b> a écrit :<br></div>
<blockquote style="border-left: 2px solid rgb(16, 16, 255); padding-left: 5px; margin-left: 5px;"><br>De: Luis Ibanez &lt;<a href="mailto:luis.ibanez@kitware.com" target="_blank">luis.ibanez@kitware.com</a>&gt;<br>Objet: Re: [Insight-users] Is there any itk::BoundingBox example?<br>
À: &quot;Juliette Deniau&quot; &lt;<a href="mailto:juliette.deniau@yahoo.fr" target="_blank">juliette.deniau@yahoo.fr</a>&gt;<br>Cc: &quot;insight&quot; &lt;<a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a>&gt;<br>
Date: Mercredi 21 Octobre 2009, 17h32<div><div></div><div class="h5"><br><br>
<div><br>Hi Juliette,<br><br><br>For your convenience,<br><br>We just added to ITK an example on how to do this <br>by using the ImageMaskSpatial object and its method:<br><br>          GetAxisAlignedBoundingBoxRegion()<br>
<br><br>This new example  is now under the directory:<br><br>            Insight/Examples/SpatialObjects<br><br>The filename is:<br><br>   BoundingBoxFromImageMaskSpatialObject.cxx<br><br>and the essential part of the code is:<br>
<br><br> typedef itk::ImageMaskSpatialObject&lt;3&gt;      ImageMaskSpatialObject;<br><br>  typedef ImageMaskSpatialObject::ImageType   ImageType;<br>  typedef ImageType::RegionType               RegionType;<br>  typedef itk::ImageFileReader&lt; ImageType
 &gt;   ReaderType;<br><br>  ReaderType::Pointer reader = ReaderType::New();<br><br>  reader-&gt;SetFileName( argv[1] );<br>  reader-&gt;Update();<br><br>  ImageMaskSpatialObject::Pointer maskSO = ImageMaskSpatialObject::New();<br>
<br>  maskSO-&gt;SetImage ( reader-&gt;GetOutput() );<br><br>  RegionType boundingBoxRegion  = maskSO-&gt;GetAxisAlignedBoundingBoxRegion();<br><br>  std::cout &lt;&lt; &quot;Bounding Box Region: &quot; &lt;&lt; boundingBoxRegion &lt;&lt; std::endl;<br>
<br><br>Here we assume that you are reading a binary image.<br><br>Note  that the bounding box is actually stored in an<br>itk::Region&lt;3&gt; class, instead of an itk::BoundingBox<br>class.<br><br>The main difference between these two classes is that the<br>
Region represents pixels (discrete positions on the image <br>grid), while the itk::BoundingBox represents physical <br>coordinates in Space.<br><br><br>Another option that you
 may want to consider is the use <br>of the LabelMap classes contributed by Gaetan Lehmann.<br><br>  <a href="http://www.insight-journal.org/browse/publication/176" rel="nofollow" target="_blank">http://www.insight-journal.org/browse/publication/176</a><br>
<br>These classes are now in the directory:<br><br>           Insight/Code/Review<br><br>In particular the <br><br>          itkAutoCropLabelMapFilter.h<br><br>will do both:<br><br>  * Computing the bounding box<br>  * Extracting that region from the image.<br>
<br>These family of classes will also compute features<br>such as the center of gravity, if you actually need<br>such values as well.<br><br><br>  Regards,<br><br><br>        Luis<br><br><br>-------------------------------------------------------------------------------------<br>

<div class="gmail_quote">On Mon, Oct 19, 2009 at 6:48 AM, Juliette Deniau <span dir="ltr">&lt;<a href="http://fr.mc282.mail.yahoo.com/mc/compose?to=juliette.deniau@yahoo.fr" rel="nofollow" target="_blank">juliette.deniau@yahoo.fr</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="font-family: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">
<p class="MsoNormal" style="margin: 0cm 0cm 10pt;"><font size="3" face="Calibri">Hi,</font> </p></td></tr></tbody></table></blockquote></div>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt;"><font size="3"><font face="Calibri">I would like to get the bounding box of a segmented object .<span>  </span><span style="color: black;">Currently I’m doing that by computing the min, max, and the center of gravity of the object . I would like to do it using the already itk class </span>itk::<span style="color: black;"> </span></font></font><a title="Represent and compute information about bounding boxes." href="http://www.itk.org/Doxygen316/html/classitk_1_1BoundingBox.html" rel="nofollow" target="_blank"><span style="color: windowtext; text-decoration: none;"><font size="3" face="Calibri">BoundingBox</font></span></a><font size="3"><font face="Calibri">, <span> </span>however<span style="color: black;"> I don’t know how? Any help is appreciated. </span></font></font></p>
</div>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt;"><span style="color: black;"><font size="3"><font face="Calibri">Thanks</font></font></span> 
</p><p class="MsoNormal" style="margin: 0cm 0cm 10pt;"><font size="3" face="Calibri">Juliette</font></p></div></div></blockquote></td></tr></tbody></table><div><div></div><div class="h5"><font color="#888888"><br></font><br>
_____________________________________<br>Powered by <a href="http://www.kitware.com/" rel="nofollow" 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" rel="nofollow" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>Please keep messages on-topic and check the ITK FAQ at: <a href="http://www.itk.org/Wiki/ITK_FAQ" rel="nofollow" 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" rel="nofollow" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br><br><br><br>



      </div></div></blockquote></div><br>