[Insight-users] Filtering region by region an image

Miller, James V (Research) millerjv@crd.ge.com
Thu, 20 Feb 2003 11:36:19 -0500


If you put a StreamingImageFilter at the end of your pipeline, and set
the number of divisions to 4, then the StreamingImageFilter will execute
the upstream pipeline 4 times each with a different RequestedRegion 
and tile the results into a single image.  Unfortunately, the 
default ImageRegionSplitter used by the StreamingImageFilter will divide
your input image like

  ---------------------------
 |            1              |
 |---------------------------|
 |            2              |
 |---------------------------|
 |            3              |
 |---------------------------|
 |            4              |
  ---------------------------

But if you set the RegionSplitter (via the SetRegionSplitter() method on the StreamingImageFilter) to
a itk::ImageRegionMultipleDimensionSplitter you can control the splits to be 

  ---------- ----------
  |         |         |
  |         |         |
  |    1    |     2   |
  |         |         |
  ---------- ----------
  |         |         |
  |         |         |
  |    3    |     4   |
  |         |         |
  ---------------------

I haven't tried this in a while so let me know if you have any problems.  Also, using the
StreamingImageFilter assumes that the upstream pipeline support streaming. 




> -----Original Message-----
> From: Mathieu Malaterre 
> [mailto:Mathieu.Malaterre@creatis.insa-lyon.fr]
> Sent: Thursday, February 20, 2003 10:33 AM
> To: ITK Users
> Subject: [Insight-users] Filtering region by region an image
> 
> 
> Hi all,
> 
>    I would like to know, how I can work on a region of an 
> image. I tried 
> to do it with ExtractImageFilter but I fail to make it work.
> 
>    The output of the filter where of the size of the extracted region 
> (which is the way ExtractImageFilter is supposed to work: decrease 
> size), but I wanted it to be of size of the initial image (= input of 
> ExtractImageFilter)
> 
>    Basically here is what I want to do. Let say I have an 
> image that I 
> want to filter on 4 distinct parts (not necesseraly identical).
> 
> ---------- ----------
> |         |         |
> |         |         |
> |    1    |     2   |
> |         |         |
> ---------- ----------
> |         |         |
> |         |         |
> |    3    |     4   |
> |         |         |
> ---------------------
> 
>    Could someone give me the pipeline to use ? So that at the 
> end I have 
> filtered the whole image (I don't know how to concat images 
> after having 
> them extracted through ExtractImageFilter).
> 
>    Should I use ImageRegion/ ImageRegionIterator/ ExtractImageFilter ?
> 
>    Hoping to be clear,
> 
>    Thank you,
>    Mathieu Malaterre
> 
> 
> -- 
> Mathieu Malaterre
> CREATIS
> 28 Avenue du Doyen LEPINE
> B.P. Lyon-Montchat
> 69394 Lyon Cedex 03
> http://www.creatis.insa-lyon.fr/~malaterre/
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
>