[Insight-users] Re: draft of adaptative threshold (itkConnectedThresholdImageFilter)

Luis Ibanez luis.ibanez@kitware.com
Wed, 19 Feb 2003 13:55:57 -0500


Hi Mathieu,

Thanks for clarifying the description of your problem.
It is much better now  :-)

----

I don't think that cutting the image in regions and using
different threshold per region may be a robust method
for segmenting this type of image.

I would suggest you to try any of the following options

Option (A) :
     Do confidence connected on the
     Gradient magnitude image of your input image.

      You can do this by:

     1) Apply a GradientMagnitude filter to your input
      image. you can use the
      GradientMagnitudeRecursiveGaussianImageFilter
      for doing so.

      Tune the value of sigma so that the edges of vessels
      are not  too smeared out.

      2) Take this new image, which should look almost
       black inside the vessels and have bright edges on
       the vessel edge; and apply a ConfidenceConnected
       filter on it. Provide a seed inside the vessel. and
       play with the number of iterations and the multiplier.

      The confidence connected filter in this case, will
      basically fill out  the region that has a consistent mean
      value for the gradient of the input image.

      This should allow the region to grow inside the vessel,
      flooding the regions that have continuous gradient, but
      still be contained by the vessel's walls that have high
       gradients.


Option (B):

      Apply any of the edge-preserving image filters
      described in the software guide and then use the
      FastMarchingLevelSetImageFilter.

      This will grow a level set inside the vessel.

      In this case, you will have to pay a lot of attention
      to the aspect of the speed image to be provided to
      the FastMarchingImageFilter.

      You will also have to play with the maximum
      value of the Time Crossing Map, since the
      level set front will not be contained in the
      vessel for ever, and will leak at some point
      through the edges

Option (C)
      If option (B) keeps leaking, you may use
      the GeodesicActiveContours  level set filter
       which imposes a constraint in the curvature of
       the front. This helps to prevent leaking.

Option (D)
      Register an itkTubeSpatialObject to the
      image.  This is the approach of performing
      segmentation by registering a model with
     the image. There is an example on
     ModelToImage registration on the software
     guide. This option may require some more effort
     for getting everything to work correctly, but
     it is probably the best compromise for the
     long run. Since you end up with a geometrical
     model that describe your vessel, this lead you
     directly to the level of "image analysis" as opposed
     to the level of image processing in options (A),
     (B) and (C).



Options (A) (B) and (C) are all equivalent to an
adapting thresholding. Since you are somehow
thresholding on the gradient magnitude of the
input image. These three approaches will ignore
slow changes in image intensity and only consider
step changes like those found in the vessel border.



Please let us know if you have further questions.


Thanks


   Luis


----------------------------------------
Mathieu Malaterre wrote:

 > Luis,
 >
 >    Thank you for your answer.
 >    I'll try to be more precise.
 >
 >    So far I only get a portion of my image (black and white but
 > dimensions are smaller in 'y' direction).
 >
 > original image:
 > DIMENSIONS 59 144 79
 >
 > output of threshold:
 > DIMENSIONS 59 31 79
 >
 >   What I want to know is if I used properly the region iterator of an
 > image. In my image the contrast agent is very bright in the aneursim
 > (and a little bit more gray in the vessel end .. which all my problem).
 >
 > If you want you can have a look at a slice:
 > http://www.creatis.insa-lyon.fr/~malaterre/vtk/vessel.png
 >
 > You'll -hardly- see a cross that shows the value at selected pixel :
 > 107.875
 >
 > If I use ConnectedThresholdImageFilter with a Lower thershold of
 > 107.875 and an Upper threshold of 10000 I got some noise around my
 > vessel, which of course I don't want.
 >
 > If now you look carefully at this image, you'll see that the end of
 > the vessel (where the selected pixel is) is surrounded by a very dark
 > background. The idea that came was to cut this image into pieces and
 > threshold it with different Lower values (upper value doesn't matter).
 > For instance we can divide this image (vessel.png) into 4 pieces:
 >
 >
 > ----------------------------
 > |     |      |      |      |
 > |     |      |      |      |
 > |     |      |      |      |
 > |     |      |      |      |
 > ----------------------------
 >
 >   L1     L2     L3     L4
 >
 > Where L_i is the Lower threshold value associated with each pieces of
 > image (with L1 <> L2 <> L3 <> L4). This is just as if I wanted to
 > threshold a part of the image without knowing it is part of a bigger one.
 >
 >
 > Hopping to be clear this time, do not hesitate to ask me if I wasn't.
 >
 > thanks a lot for time Luis,
 >
 > Mathieu
 >
 >
 >