[Insight-users] A few questions

Luis Ibanez luis . ibanez at kitware . com
Fri, 26 Sep 2003 15:10:08 -0400


Hi Feng,

1) If you are writing your own filter you should
    process the Requested region. If your are processing
    your image using iterators, BufferedRegion.

    Please don't use LargestPossible region, because you
    cannot be certain that the full image is loaded in
    memory.  BufferedRegion() is the safest option.

    That will not guarrante to visit all the pixels in
    the image, but at lest all the ones that are actually
    loaded in memory.

2) Random access will always be inefficient. You may
    simply use the GetPixel() / SetPixel() methods.


3) Yes, please read "Region Growing" in
    http://www . itk . org/ItkSoftwareGuide . pdf
    Section 9.1, pdf-page 341

        ConnectedThresholdImageFilter

    This will not return a PointSet, but a binary image.
    Producing a PoinSet from the binary image will be
    relatively simple.


4) No,
    If you want to apply a process to a subregion
    you should use the RegionOfInterestImageFilter
    and extract the region first.


Regards,


   Luis



-----------------
Feng Ma wrote:
> Hi,
> 
>  May I ask a few questions regarding efficiently using ITK data 
> structures? I have been reading the software guide. But apparently I 
> haven't got the essences of ITK data structures yet.
> 
>  1. GetRequestedRegion(), GetLagestPossibleRegion(), 
> GetBufferedRegion(), which one to use? I have an itk image. I want to go 
> through all the image voxels sequentially. I guess I should use 
> itk::ImageRegionConstIterator to walk through the image. To construct 
> this iterator, I need to provide a region. Which one should I use? 
> Intuitively, I want to use GetLarestPossibleRegion() to make sure I will 
> be able to visit every voxel. In many examples, we use 
> GetRequestedRegion(). Does that gurantee me to visit every voxel in 
> iimages?
> 
>  2. How to visit selected regions (random access voxels) efficiently? 
> Suppose I have a region, through watershed or region growing. I recorded 
> voxels in this region in a PointSet. After some processing, I need to 
> visit the same region again. Suppose this is a relatively small region 
> compared to the whole image. I don't want to visit the whole image and 
> find this region again. It is better to be able to directly visit each 
> voxels in the PointSet. The software guide said using SetPixel() is not 
> efficient and "very slow". Which iterator shall I use to random access 
> those voxels?
> 
>  3. Region growing: Is there a region growing filter which takes one or 
> more seeds and grows from these seeds (with certain threshold values), 
> and return a PointSet of grown region?
> 
>  4. Non-image-to-image filters? Seems that most filters are image to 
> image filters. That means if I want to access resulted region, I need to 
> scan the image and find the region I am interested in.
> 
>  Thanks a lot.
> 
> -Feng
> 
> _________________________________________________________________
> Frustrated with dial-up? Get high-speed for as low as $29.95/month 
> (depending on the local service providers in your area).  
> https://broadband . msn . com
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org
> http://www . itk . org/mailman/listinfo/insight-users
>