[Insight-users] filter to create a subgraph of an image

Luis Ibanez luis.ibanez at kitware.com
Wed May 26 13:12:13 EDT 2010


Hi Roman,


1) If you are doing this for visualization purposes, you could look at
    the VTK class

http://www.vtk.org/doc/nightly/html/classvtkImageDataGeometryFilter.html

and the example:
http://www.vtk.org/Wiki/VTK/Examples/ImageData/ImageDataGeometryFilter



2) If you really want to get a 3D volume where the lines along Z
    are filled up, up to the value of the intensities provided by
    a 2D image, then you could do this by using ImageIterators.


   In particular,

     a) Create the 3D volume from scratch (as shown in the
         ITK Software Guide)
         making sure that the X,Y dimensions match those of
         your input 2D image.

     b) create a Linear iterator
http://public.kitware.com/Insight/Doxygen/html/classitk_1_1ImageLinearIteratorWithIndex.html
          to visit the 3D image, and set the direction to "2" (the Z axis).

          See the ITK Software Guide chapter on "Image Iterators"

          at every pass of the line, get the X,Y index coordinates
          in order to get the pixel value from the 2D image.



    Regards,


           Luis


--------------------------------------------------------------------------------------
On Tue, May 25, 2010 at 12:07 PM, Roman Grothausmann
<roman.grothausmann at helmholtz-berlin.de> wrote:
> Dear mailing list members,
>
>
> Now I figured out that what I want is called a subgraph of an image. (As
> described on p. 19,20 by P. Soille in Morphological Image Analysis)
>
> Is there a filter in itk that creates a subgraph of a grey input image?
> (The only thing I could find for itk+subgraph is a bug-report:
> http://www.itk.org/Bug/bug_relationship_graph.php?bug_id=8005&graph=dependency)
>
> Any help is very much appreciated
> Roman
>
> Roman Grothausmann wrote:
>>
>> Dear mailing list members,
>>
>>
>> Is there a filter in ITK that converts a grey image into a profile plot
>> binary image? Eg a 2D grey image into a 3D binary image where the hight of
>> each voxel column corresponds to the grey value of the corresponding pixel
>> in the 2D image?
>> Or how can I apply a morphological closing/opening on the profile of an
>> image as described below?
>>
>> Any help is very much appreciated
>> Roman
>>
>> Roman Grothausmann wrote:
>>>
>>> Dear Richard,
>>>
>>> Richard Beare wrote:
>>>>
>>>> I've submitted a suite of parabolic morphology tools to the insight
>>>> journal :
>>>>
>>>> http://hdl.handle.net/1926/1370
>>>
>>> I get redirected to http://ij.itk.org/midas/item/view/2280 and then it
>>> says:
>>> You cannot access this item!
>>>
>>> But I found it over the Insight Journal search:
>>> http://www.insight-journal.org/browse/publication/228
>>>
>>> It seems to be exactly what I'm looking for but reading Your contribution
>>> article I started to wonder:
>>> How do You get from a 1D image (as in figure 1) to a 2D binary image
>>> (which consists of foreground pixel columns whose heights correspond to the
>>> intensity values of the 1D image pixels) so that You can perform the (2D)
>>> parabolic dilation?
>>>
>>> Or asked differently:
>>> For smoothing a 2D image a 3D-ball (or paraboloid) is rolled over the
>>> intensity profile which is a uneven 2D surface in 3D space. But if I look at
>>> GrayscaleDilateImageFilter it expects a structuring element in 2D if the
>>> input is a 2D image. (And I'd say it's not the same result as rolling a
>>> 3D-ball over the intensity profile.)
>>> So is there a pre-filter that would crate a 3D binary image (from my 2D
>>> grey image) on which I could apply the BinaryDilateImageFilter with a ball
>>> structuring element? (And then a filter to convert this 3D binary image back
>>> to a 2D grey image?)
>>>
>>> Many thanks again.
>>> Roman
>>>
>>>
>>>
>>>> be sure to fetch the latest version from the repository referenced in
>>>> the paper.
>>>>
>>>> On 4/22/10, Roman Grothausmann <roman.grothausmann at helmholtz-berlin.de>
>>>> wrote:
>>>>>
>>>>> Dear mailing list members,
>>>>>
>>>>>
>>>>> To prevent a gradient decent filter from stopping at an insignificant
>>>>> local minimum I'd like a ball of some radius to roll over the intensity
>>>>> profile of an image. The result I'm interested in is the trace of the
>>>>> ball (or paraboloid) centre while the ball is rolling.
>>>>> I think this is equivalent to smoothing the image with such a rolling
>>>>> ball filter as this ImageJ filter:
>>>>>
>>>>> http://rsbweb.nih.gov/ij/docs/menus/process.html#background
>>>>>
>>>>> And then tracing the gradient decent as is done in the Random access
>>>>> iteration example in the user guide.
>>>>>
>>>>> So I wonder now is there a filter in ITK for image smoothing that works
>>>>> by simulating a sliding ball or paraboloid like the imageJ filter?
>>>>>
>>>>> Any help is very much appreciated
>>>>> Roman
>>>>>
>>>
>>
>
> --
> Roman Grothausmann
>
> Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
> Bereich Funktionale Materialien
> Institut für angewandte Materialforschung
> Hahn-Meitner-Platz 1
> D-14109 Berlin
>
> Tel.: +49-(0)30-8062-2816
> Fax.: +49-(0)30-8062-3059
>
> Vorsitzender des Aufsichtsrats: Prof. Dr. Dr. h.c. mult. Joachim Treusch
> Stellvertretende Vorsitzende: Dr. Beatrix Vierkorn-Rudolph
> Geschäftsführer: Prof. Dr. Anke Rita Kaysser-Pyzalla, Prof. Dr. Dr. h.c.
> Wolfgang Eberhardt, Dr. Ulrich Breuer
> Sitz der Gesellschaft: Berlin
> Handelsregister: AG Charlottenburg, 89 HRB 5583
>
> _____________________________________
> 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