[Insight-users] WatershedSegmentation

Luis Ibanez luis.ibanez at kitware.com
Sun Apr 30 07:32:06 EDT 2006


Hi Wong,

If you already have the image data in the form of a memory
buffer, you can use the itkImportImageFilter in order to
create an itk Image that uses your memory buffer.

http://www.itk.org/Doxygen/html/classitk_1_1ImportImageFilter.html


You will find this process described in the Tutorials:

       http://www.itk.org/HTML/Tutorials.htm

more specifically in

http://www.itk.org/CourseWare/Training/GettingStarted-V.pdf



You will also find this described in the ITK Software Guide

      http://www.itk.org/ItkSoftwareGuide.pdf

In section 4.1.7, "Importing Image Data from a Buffer", in
pdf-page 78.

The source code example is available at:

         Insight/
            Examples/
               DataRepresentation/
                               Image/
                                   Image5.cxx




You should also read the Watershed section in the ITK
Software Guide. You will notice that in general you should
pass the Gradient Magnitude of your image as the input to
the Watershed, unles your image structure already is suitable
for classifying it in basins of intensity.


Please let us know if you find any problem using this
method.


      Thanks



         Luis






========================
Wong Shek Yoon wrote:
> Hi Luis,
> 
> Actually I have processed the images into matrix (array) form, and i 
> would like to send the data to the watershed filter. I dont want to 
> first save the data in image form then send the filename to the filter 
> as the filetypes  i used(.ics/ids, .ims) are not recognized in itk.  
> 
> Thanks for replying.
> 
>  
> 
> Joanne
> 
>     ------------------------------------------------------------------------
>     From:  /Luis Ibanez <luis.ibanez at kitware.com>/
>     To:  /Wong Shek Yoon <w_s_yoon at hotmail.com>/
>     CC:  /insight-users at itk.org/
>     Subject:  /Re: [Insight-users] WatershedSegmentation/
>     Date:  /Sat, 29 Apr 2006 15:22:06 -0400/
>      >
>      >
>      >Hi Joanne,
>      >
>      >By "passing data directly to the filter"
>      >
>      >do you mean
>      >
>      >1) to take the output of another ITK filter
>      >    and pass it as input to the Watershed filter ?
>      >
>      >2) to take a binary buffer that you already
>      >    have in memory, and build an ITK images
>      >    with it, in order to pass it as input
>      >    to the Watershed ?
>      >
>      >
>      >Both things can be done, but the details on how
>      >to do it, are different.
>      >
>      >Please let us know which one is the case that
>      >you are interested in implementing.
>      >
>      >
>      >
>      >    Thanks
>      >
>      >
>      >       Luis
>      >
>      >
>      >
>      >=====================
>      >Wong Shek Yoon wrote:
>      >>Hi
>      >>If for the example on WatershedSegmentation, Is it possible that we
>      >>pass in the data directly to filter instead of passing the filename
>      >>to the itkImageFileReader? if this is possible, what is the format
>      >>of data needed ? How can we do it?
>      >>
>      >>
>      >>
>      >>Thanks a lot.
>      >>
>      >>
>      >>
>      >>
>      >>
>      >>Joanne
>      >>
>      >>
>      >>------------------------------------------------------------------------
>      >>
>      >>_______________________________________________
>      >>Insight-users mailing list
>      >>Insight-users at itk.org
>      >>http://www.itk.org/mailman/listinfo/insight-users
>      >
>      >




More information about the Insight-users mailing list