[Insight-users] Regarding Fast Marching

Dawood Al Masslawi masslawi at gmail.com
Wed Jun 22 11:23:51 EDT 2011


What do you mean by "failed"?!!

Did you get errors or just didn't get the results you desired?

Parameter tuning is of course time consuming and an error-prone process but
it can be done easier

if you would have prior knowledge about the components (pipeline) of the
segmentation method.

To get more information about the available segmentation methods in ITK it's
very helpful to read

the ITK software guide, specially the "Segmentation" chapter (chapter 9).

You also could do a little search on the mailing list  and see previous
discussions about the segmentation

method you want to use, level-set methods certainly has been discussed
frequently!

Following are some of my posts on this subject,


------------------------------------------------------

"GeodesicActiveContours processing time and SignedDanielssonDistanceMap"

You don't need to use the fastMarching filter if you are using the
DanielssonDistanceMap
and vice versa.
If you want to lower the computation time you can decrease the number
of iterations or
assign lower values for the maximum allowed RMS.
The initialDistance parameter is the distance between the seed points
and the desired
initial contour.

Note that the assigned Alpha and Beta values for the sigmoid filter
can have a significant

effect on the results. It is best to choose the Beta close to the
initial contour value and
assign the Alpha in which an acceptable range of values around the Beta would be
mapped.

"on tuning Laplacian Level Set Segmentation
(LaplacianSegmentationLevelSetImageFilter.cxx)"

For better convergence it is best to have a good initial estimation
of the level set as a seed image. Larger number of iterations alone
does not guarantee the convergence.
Basically using the diffusion filter improves the quality of the
segmentation, however over-diffusing the images can cause loss of
details.
You can use the resulting image (SpeedImage.mha) to determine that
to what extent you want to diffuse the input image. Increasing the
number of diffusion iterations and higher values for the conductance
will give a more diffused image.
Propagation weight determines the relative amount emphasis on
the propagation speed and with higher values results in narrower
surfaces, opposing to the curvature weight (curvature scaling) which
with higher values gains smoother surfaces.
The isovalue I think is best to be assigned as halfway between the
maximum and minimum values in the seed image.
Also, Premature elimination might be the result of the low maximum
allowed RMS.
As for number of iterations for both diffusion and segmentation after
couple of tries and assigning different values you should be able to
find the best fit for your application.

"handle watershed oversegmentation"

The level of details in watershed segmentation is controlled by a
smoothing step. It is most likely that the parameter setting
for the smoothing step in your application is causing an under-smoothing
effect. Usually for smoothing prior to the watershed segmentation an
anisotropic diffusion filter is used. The level of smoothing in anisotropic
diffusion filter is controlled by three parameters, number of iterations,
time step and conductivity. Increasing the number of iterations and the
conductivity factor can smooth more edges.
However, depending on your images better results might be achievable
using a different smoothing method.


------------------------------------------


There are sure more discussions on the mailing list, I just included
some I wrote


in previous discussions.


One little thing to add, the time step for the diffusion filter should
be less than


1/(2^N), N being image dimensions. Usually something around 0.125
works fine (for 2D images).


Also note that the described segmentation methods in the ITK software
guide are just


examples and you can replace any of the used components with other
filters better suited


to your application.


By the "middle bright region" do you mean the cerebral hemisphere,
White Matter or the white


region (tumor?!!) in the middle of the right lobe?


Dawood



>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<


On Tue, Jun 21, 2011 at 10:18 AM, amit satish <amitsatish.unde at teamta.in>wrote:

> **
> On 6/18/2011 5:40 PM, Dawood Al Masslawi wrote:
>
> Hi Amit,
>
>  In addition to what Kevin said, select the Alpha and Beta values such
> that the regions you want to
>
>  segment would be emphasized in the resulting image, for an instance, make
> the bright regions brighter
>
>  if you want to segment the bright regions.
>
>  Choose the value for Sigma based on how much detail you want to include
> in the segmented image,
>
>  lower values will result in more details and higher values will smooth
> more details hence resulting in less
>
>  details in the segmented image.
>
>  Assigning the seed points and the threshold by users (radiologists in
> your case) can be done using Graphical User Interface
>
>  tools such as FLTK or Qt and VTK, but it's probably better to get your
> application up and running before developing a GUI.
>
>  Hope that helps,
>
>  Dawood
>
>
>
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>
>
>  On 06/17/2011 01:39 AM, amitsatish.unde at teamta.in <http://www.itk.org/mailman/listinfo/insight-users> wrote:
> >* I am using ItK fast marching for liver tumor segmentation. I want to select manually seed point and output is segmented tumor. My problems is as below,*>* 1.can you specify exact value of alpha,beta and sigma for all examples?*>* 2.it's very difficult to give threshold value everytime. I am trying to implement a method such that radiologists will choose seed point in tumor region and our algorithm will give exact boundary of tumor. All other parameters i want to set by me.*>**>**>* Regards,*>* Amit*
> The parameters used in the software guide for the fast marching
> example are listed at the top of the source code :
>
> //  Software Guide : BeginCommandLineArgs
> //    INPUTS: {BrainProtonDensitySlice.png}
> //    OUTPUTS: {FastMarchingImageFilterOutput5.png}
> //    81 114 1.0  -0.5  3.0   100 100
> //  Software Guide : EndCommandLineArgs
> //  Software Guide : BeginCommandLineArgs
> //    INPUTS: {BrainProtonDensitySlice.png}
> //    OUTPUTS: {FastMarchingImageFilterOutput6.png}
> //    99 114 1.0  -0.5  3.0   100 100
> //  Software Guide : EndCommandLineArgs
> //  Software Guide : BeginCommandLineArgs
> //    INPUTS: {BrainProtonDensitySlice.png}
> //    OUTPUTS: {FastMarchingImageFilterOutput7.png}
> //    56 92 1.0  -0.3  2.0   200 100
> //  Software Guide : EndCommandLineArgs
> //  Software Guide : BeginCommandLineArgs
> //    INPUTS: {BrainProtonDensitySlice.png}
> //    OUTPUTS: {FastMarchingImageFilterOutput8.png}
> //    OUTPUTS: [FastMarchingFilterOutput1.png]
> //    OUTPUTS: [FastMarchingFilterOutput2.png]
> //    OUTPUTS: [FastMarchingFilterOutput3.png]
> //    40 90 0.5  -0.3  2.0   200 100
> //  Software Guide : EndCommandLineArgs
>
> Unfortunately, the parameters are there for a reason, one value
> does not always work well for all images.
>
> My advice to you is to take the example programs and to cut them
> up into the smallest usable pieces so that you can actually look
> at the images at each step. For the fast marching example you'd
> end up with 5 tiny programs :
>
> reader -> smoother           -> writer
> reader -> gradient magnitude -> writer
> reader -> sigmoid            -> writer
> reader -> fast marching      -> writer
> reader -> threshold          -> writer
>
> Take a typical example of your images and open it up in ParaView
> (or your viewer of choice).
>
> You'll probably find that the intensity profile through the
> object you're interested in is bumpy :
>                                                  oo
>                               oooooo   oo    oo
>         o          oo                  oo           o         o
> oooo ooo oo    ooo                             ooooo oooo
>
> adjust the parameters of the smoothing filter until the profile
> looks as much like this as possible:
>
>                                 ooooooooooooo
>                               o                          o
> ooooooooooooooo                              ooooooooo
>
>
> adjust the parameters of the gradient magnitude filter until it
> looks like this :
>                               o                            o
>                             o  o                        o  o
> oooooooooooooo      ooooooooooo      oooooooo
>
>
> sigmoid :
>
> ooooooooooooooo oooooooooooooo oooooooooo
>
>                               o                            o
>
> fast :
>
>                               o                            o
>                                  o                       o
>                                    o                   o
>                                      o               o
>                                         o          o
>                                            o     o
>                                               oo
>
> the point is LOOK at the intermediate images.
>
>
>  I am now totally confusing. I am not understanding which is good methods
> for segmentation because decision of various parameter is critical.
> I tried for threshold level set segmentation, geodesic active contour for
> tumor boundary detection but i failed every time. Please explain briefly how
> to choose exact parameter for above methods.
> I have attached image in which i want to segment middle bright region.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110622/643eb36e/attachment.htm>


More information about the Insight-users mailing list