[Insight-users] A few questions
Luis Ibanez
luis . ibanez at kitware . com
Fri, 26 Sep 2003 19:05:10 -0400
Hi Feng,
If you need to make sure that the output of one filter
contains the result of processing the entire image, you
should invoke
filter->UpdateLargestPossibleRegion();
instead of
filter->Update();
You will certainly run into memory issues with the size
of this data set. Something that can help you is to call
filterXX->ReleaseDataFlagOn()
on the filters that are used for intermediate processing
and can release their data once it is passed to the
next filter.
You may want to look at the code of the VolView plugins
in InsightApplications/VolviewPlugins where this is
often used.
By updating your filter with UpdateLargestPossibleRegion(),
you can now safely use GetLargestPossibleRegion() as the
region provided to the Iterator constructor. Actually what will
happen is that the BufferedRegion and the LargestPossibleRegion
will be the same.
Regards,
Luis
----------------
Feng Ma wrote:
> Hi, Luis:
>
> Thanks a lot for explaining this. Abou the first question, I still have
> questions. I need to make sure I visit all the voxels in an image. For
> example, I am working on a 512x512x500 CT scan. I have several filters
> working on it. Maybe I need to keep 5 different copies of this image
> (smoothed, gradient, etc). I may run into swap. In this case, will
> GetBufferedRegion() give me the whole image?
>
> Thanks.
>
> -Feng
>
>
>> From: Luis Ibanez <luis . ibanez at kitware . com>
>> To: Feng Ma <mafeng at hotmail . com>
>> CC: insight-users at itk . org
>> Subject: Re: [Insight-users] A few questions
>> Date: 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.
>>
>
> _________________________________________________________________
> 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
>