[Insight-users] Region growing segmentation with a border?

Dan Mueller dan.muel at gmail.com
Tue Aug 3 05:27:54 EDT 2010


Hi Chris,

I think I would approach this by converting the "borders" into a mask,
and then "and"-ing the mask with the input image before region
growing. This will prevent the region growing operation from leaking
out passed "borders".

Are your planes orthogonal to the image direction? Or do they have
arbitrary orientation? If they are orthogonal, then you can to simply
set the RequestedRegion on the region growing filter. If the planes
can have arbitrary orientation then you will need to convert them to
an image mask.

You may represent the planes using
    Code\SpatialObject\itkPlaneSpatialObject.h
and then convert to an image mask using
    Code\BasicFilters\itkSpatialObjectToImageFilter.h
(though this will probably be quite slow).

Alternatively, you could represent the planes using
    Code\Common\itkMesh.h
and then convert to an image mask using
    Code\BasicFilters\itkTriangleMeshToBinaryImageFilter.h

HTH

Cheers, Dan

On 2 August 2010 21:21, Chris Turner <cturnercomplex at googlemail.com> wrote:
> Hi,
>
> I have an image and want to segment it into different parts. Region
> growing should absolutely do the trick. But my only problem is that I
> also have some borders which the algorithm shouldn't cross. The
> Borders are specified as a plane. First I have to convert the plane
> coordinates into image coordinates. Is there an easy way to do so or
> do I have to do it by "hand" (....by myself)
>
> About the segmentation: My first thoughts are basically write my own
> region growing algorithm and add besides the intensity evaluation (if
> minThreshold<pixel_intensity<maxThreshold) a second evaluation which
> checks if the pixel is in the specific border/region.
>
>
> What do you think about this, do you have any better ideas? And also
> where should I start? I thought maybe just use the
> itkConnectedThresholdImageFilter (3.20) and change the iteration loop
> to something like this:
>
> [begins line 296]:
>
>    typedef FloodFilledImageFunctionConditionalIterator<OutputImageType,
> FunctionType> IteratorType;
>    IteratorType it ( outputImage, function, m_SeedList );
>    it.GoToBegin();
>
>    while( !it.IsAtEnd())
>      {
>       if(pixelPosition > border)
>          continue;
>      it.Set(m_ReplaceValue);
>      ++it;
>      progress.CompletedPixel();  // potential exception thrown here
>      }
>
> But I don't have the pixel position at this point - right?
>
>
> So how would an ITK export approach this problem?
>
> Thanks
> Chris
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>


More information about the Insight-users mailing list