[Insight-users] Re: Running examples in the SoftwareGuide

Luis Ibanez luis.ibanez@kitware.com
Sat, 22 Mar 2003 20:07:28 -0500


Hi Jianming,

This example is using an anisotropic diffusion filter
for smoothing the image as a preprocessing step.

The behavior of this filter has changed recently and
its TimeStep parameter has been re-tunned. It is likely
that your version has a TimeStep( 0.25 ) in line 423
of the file:

   Insight/Example/Segmentation/
                      FastMarchingImageFilter.cxx


Please set this parameter to "0.125". You will have
to do this in the code and recompile the program.

--

The checker board aspect of the first output image

     FastMarchingFilterOutput1.png

is due to the numerical instabilities resulting of
a too large value set in the TimeStep parameter.

---

The current cvs version of this filter example has
already been fixed.


----

About the FastMarchingLevelSet example in
InsightApplications, here is an exercise you
can do with it.

1) Take any of the BrainWeb volumes in the ftp site

      ftp://public.kitware.com/pub/itk/Data/

      download it, expand the tgz.

      take the image in the pair of MetaImage files

            brainweb010102.mha
            brainweb010102.raw



2)  Execute FastMarchingImageFilter


3)  Load the volume, it will take about 10 seconds to load.

4)  Then, click on the "display" button
     after "Gradient Magnitude". The gradient computation
     will take about 30 seconds. A viewer will appear with
     the gradient magnitude of the volume.


5)   Now click on the "Display" button just after the
      "Linear + Sigmoid" button. It will take about 10 sec.
      Another viewer should appear with the result of
      passing the gradient magnitude through the sigmoid.
      If you clidck with the mouse on the image you will see
      intensity values in the lower right corner. Homogeneous
      regions should have values close to 1.0 and contour regions
      should have values close to 0.0

6)   Now click on the "Display" button just below the "Load"
      button. This will show a viewer with the original input image.
      By clicking in this image with the mouse you will select
      seed points. A red pixel is overlayed on top of every seed
      point you selected.  If you want to clear the list of seed
      points, there is a button "Clear Seeds" below the FastMarching
      button.  You don't need many seed for this excercise.

      Just go, for example, to slice 97 and click a seed point in
      the middle of each one of the ventricles. That should be enough.

7)   Now, click on the "Time-Crosssing Map" button just after
      "FastMarching". It will take about 5 seconds to compute the map.
      A viewer should appear with the result of the time-crossing map.
      By moving the slider at the right of the viewer you should be
      able to walk through the slices, and find black regions on the
      ventricles (around slices 70 to 100),


      Finally, click on the "Overlay" button on the top right of
      the GUI. It will compute the threshold of the time-crosssing map
      and overlay it in red on top of the input image. You can control
      the transparency of the overlay with the menu bar option on the
      viewer:  Click on "Overlay" in the menu bar and then in "Opacity",
      a small window with a slider will popup. Moving the slider you
      can change the opacity = (1-tranparency) of the red overlay.
      If you move now the slice-slider on the right of the viewer you
      will be able to visit all the slices.


8)   You will notice that the segmentation always falls short on
      touching the actual border of the ventricles.
      This is natural in Level Sets and it is mainly
      due to the width of the contour bands produced by the Gradient
      Magnitude filter. A smaller sigma could help to get closer to the
      contour,... but it will never be possible to get to it since a
      gradient will always have some width.

      In practice it could make sense to just apply a couple of
      Mathematical Morphology Dilations on the final binary mask.
      The size of the structurant element should be correlated with the
      sigma used in the gaussian.


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


Regards,


    Luis



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

jianming.liang@computer.org wrote:
> Hi, Luis,
> 
> Thanks a lot. I have tried
> 
>    ./FastMarchingImageFilter ../../../../ITK1.2/InsightToolkit-1.2.0/Examples/Data/BrainProtonDensitySlice.png
>     FastMarchingOutput.png 81 114 1.0 -0.5 3.0 100 50
> 
> the output (FastMarchingFilterOutput3.png) seems rather noisy
> comparing with the image shown in Figure 8.11, and
> FastMarchingFilterOutput2.png seems darker that what you have.
> 
> Also, would you please point me an image and give me a set of parameters,
> so that I may play with
> 
>   \ITK\ITK1.2bin\InsightApplications-1.2.0\FastMarchingLevelSet\Debug\FastMarchingLevelSet.exe
> 
> Thanks, Jianming Liang