[Insight-users] 2D mask apply to 3D image series

Luis Ibanez luis.ibanez at kitware.com
Fri May 30 10:34:42 EDT 2008


Hi Suyang,

There is no particular filter that comes to mind...

My suggestion will be to use image iterators and
intertwine the 2D loop with the 3D one.

Another option is to do

   - Extract image filter 3D -> 2D
   - MaskImageFilter in 2D
   - PastImage filter to put the slice back

and set this inside a while loop.


It is quite likely that there
are better ways to do it...


Perhaps looking at the code of the paper:

"Slice by slice filtering with ITK
by Gaetan Lehmann
http://www.insight-journal.org/InsightJournalManager/view_reviews.php?back=search.php%3Ftexte%3Dslice&journalid=6&pubid=133
http://hdl.handle.net/1926/368

may lead to a cleaner approach.


   Regards,


       Luis


------------------
Suyang Mei wrote:
> Hi, all -
>  
>   a simple question -
>  
>   I have a 2D binary mask which is generated from AccumulateImageFilter 
> of 3D image volumes, and now I want to apply this 2D mask to each of the 
> 3D slices. Is there any ITK class performing this kind of task?
>  
>   Thanks a lot.
>  
> Suyang
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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