At first though maybe you can let the region grow past the plane, and later, cut the growed region multiplying it with a mask image of the valid area if you can obtain such a mask easily.<div><br></div><div>Regards.<br><br>
<div class="gmail_quote">On Mon, Aug 2, 2010 at 9:21 PM, Chris Turner <span dir="ltr">&lt;<a href="mailto:cturnercomplex@googlemail.com">cturnercomplex@googlemail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<br>
I have an image and want to segment it into different parts. Region<br>
growing should absolutely do the trick. But my only problem is that I<br>
also have some borders which the algorithm shouldn&#39;t cross. The<br>
Borders are specified as a plane. First I have to convert the plane<br>
coordinates into image coordinates. Is there an easy way to do so or<br>
do I have to do it by &quot;hand&quot; (....by myself)<br>
<br>
About the segmentation: My first thoughts are basically write my own<br>
region growing algorithm and add besides the intensity evaluation (if<br>
minThreshold&lt;pixel_intensity&lt;maxThreshold) a second evaluation which<br>
checks if the pixel is in the specific border/region.<br>
<br>
<br>
What do you think about this, do you have any better ideas? And also<br>
where should I start? I thought maybe just use the<br>
itkConnectedThresholdImageFilter (3.20) and change the iteration loop<br>
to something like this:<br>
<br>
[begins line 296]:<br>
<br>
    typedef FloodFilledImageFunctionConditionalIterator&lt;OutputImageType,<br>
FunctionType&gt; IteratorType;<br>
    IteratorType it ( outputImage, function, m_SeedList );<br>
    it.GoToBegin();<br>
<br>
    while( !it.IsAtEnd())<br>
      {<br>
       if(pixelPosition &gt; border)<br>
          continue;<br>
      it.Set(m_ReplaceValue);<br>
      ++it;<br>
      progress.CompletedPixel();  // potential exception thrown here<br>
      }<br>
<br>
But I don&#39;t have the pixel position at this point - right?<br>
<br>
<br>
So how would an ITK export approach this problem?<br>
<br>
Thanks<br>
Chris<br>
_____________________________________<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>
</blockquote></div><br><br clear="all"><br>-- <br>Sergio Vera<br><br> Alma IT Systems<br> C/ Vilana, 4B, 4º 1ª<br> 08022 Barcelona<br> T. (+34) 932 380 592<br> <a href="http://www.alma3d.com">www.alma3d.com</a><br>
</div>