[Insight-users] Fast access to slices of 3D image + problem with BinaryFillholeImageFilter

Bill Lorensen bill.lorensen at gmail.com
Mon Apr 25 23:08:24 EDT 2011


In the example, did you change:
 const int dim = 2;
to
 const int dim = 3;


On Mon, Apr 25, 2011 at 9:13 PM, Tiago Brizolara da Rosa
<yarroo at yahoo.com>wrote:

> Hi all,
>
>     I would like to know if there is a fast way of manipulating a slice of
> a 3D volume. Specifically, I want to apply a filter to individual slices of
> a volume. The only way I know for doing that is by, for each desired
> slice: applying a *ExtractImageFilter* and then applying the filter I want
> to use to the slice image generated.
>     Is there a way for jumping this step (*ExtractImageFilter*)? For
> example, if I wanted to manipulate the pixels of my desired slices, I should
> use the *ImageSliceIteratorWithIndex*, so I wouldn´t need the *
> ExtractImageFilter*. But what I want is to apply a filter to each slice.
> Is it posible to do this without having to generate a new image for each one
> with *ExtractImageFilter*?
>
>     Now the problem with *BinaryFillholeImageFilter*. In fact, the reason
> for the above question comes from a workaround to the problem with this
> filter.
>     I tried to use *BinaryFillholeImageFilter* in exactly the same way as
> in the example file *binary_fill_hole.cxx*, but without success. Then I
> noticed that it works fine if my image is two-dimensional (I was trying to
> use in a 3D image read from a DICOM series). It was not supposed to work in
> a 3D image?
>     I am using ITK 3.8.0 in Windows 7 and downloaded the code for the
> morphology filters and samples from the Insight Journal´s article
>
> *Label object representation and manipulation with ITK* (
> http://www.insight-journal.org/browse/publication/176).
>     Well, as a workaround, I want to apply *BinaryFillholeImageFilter* to
> all the individual slices of the volume. I think that generating a 2D
> image for each one would be very painfull. This is the reason for the first
> question of this e-mail.
>
>     Thanks in advance,
>
>     Tiago
>
> _____________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110425/b218fe35/attachment.htm>


More information about the Insight-users mailing list