[Insight-users] Apply filter only on a specific region of very large image ?

Luis Ibanez luis.ibanez at kitware.com
Thu Jan 28 16:08:27 EST 2010


Hi Isaac,

Thanks for letting us know about the specific filters
that you are using in the pipeline.

The Median filter is streamable,

While the RecursiveGaussian family of filter is not.

(that is, the Smooth, and Hessian filters based on the
 RecursiveGaussianImageFilter, are not streamable).


The visualization part may not be too much of a problem,
once the processing of the appropriate chunk has been
solved.


What are you doing with the output of the Hessian and
the Smooth Gaussian ?

Are you visualizing them directly ?

Note that even though these filters are not strictly
streamable, they have a support where the influence of
far away pixels decrease exponentially.  There for you
could still process the image by chunks and get something
"very similar" to the actual outcome of filtering the full image
and then cropping it.

However, the pipeline will not help you in this process,
you will have to "manually" calculate the region of the
input image, that comes to be visible in your final rendering,
and then extract that region out of the input image using
the RegionOfInterestImageFilter.

Then feed that smaller image into your pipeline.


    Please let us know if you find any problems,


         Thanks


             Luis


---------------------------------------------------------------------------
On Thu, Jan 28, 2010 at 4:00 PM, Isaac Abbott <isaac.abbott at gmail.com> wrote:
> Currently I am using the MedianImageFilter and the
> SmoothingRecursiveGaussianImageFilter or
> HessianRecursiveGaussianImageFilter.
> We also do some other "filtering" using code that is not in the form of an
> itk filter (doesn't use any ITK yet)
>
> This same project requires some visualization of this image - our plan was
> to create a 2D projection and create a sliding box that the is used to
> define the region that is rendered using VTK.
> For this task I also need to just grab a portion of the image at one time
> for creating the projection and for creating the volume.
>
> Isaac
>
>
> On Thu, Jan 28, 2010 at 3:48 PM, Luis Ibanez <luis.ibanez at kitware.com>
> wrote:
>>
>> Hi Isaac,
>>
>> As you have already noticed, not all filters are
>> streamable.
>>
>> However, for those that are, it should be possible
>> to process your image by pieces.
>>
>> Brad Lowekamp has recently revamped the streaming
>> pipeline and verified that is possible to pass the entire
>> Visible Human dataset through an ITK pipeline.
>>
>>
>> What specific ITK filters are you using ?
>>
>>
>> If you are having problems with the pipeline, we should
>> identify a reproducible minimal example, in case there
>> is anything that needs to be fixed.
>>
>>
>>    Please let us know,
>>
>>
>>            Thanks
>>
>>
>>
>>                 Luis
>>
>>
>> -----
>> PS. I'm copying the ITK users-list, since this
>> topics will be of interest to many users.
>>
>> --------------------------------------------------------------
>> On Thu, Jan 28, 2010 at 3:43 PM, Isaac Abbott <isaac.abbott at gmail.com>
>> wrote:
>> > Luis,
>> >
>> > I'm trying to process some very large 3D images.  I cannot load these
>> > images
>> > using ImageFileReader because I run out of RAM.
>> > I would like to apply various filters to only subregions of this image,
>> > and
>> > write the output to the same output image file.
>> >
>> > This means my input and output images might be something like 10,000 x
>> > 10,000 x 200 voxels, but I only want 1000x1000x100 in memory.
>> > I'd load up a region, do the processing, then save the result to file,
>> > and
>> > iterate, saving the results to the same file each time.
>> >
>> > I have been following the discussion about applying filters to ROIs of
>> > an
>> > itk::Image.
>> > I've also seen some discussion about the usage of buffered region vs
>> > largest
>> > possible region vs requested region.
>> > And, I've looked at the StreamingImageFilter - which only seems to work
>> > for
>> > a limited subset of the filters.
>> >
>> > None of these discussions seem to meet my need. According to the
>> > documentation I should be able to do something with the buffered region,
>> > because this defines only the region of the image that is in memory -
>> > but I
>> > haven't seen this work in practice.
>> >
>> > Thanks for any help you can give,
>> > Isaac (Roysam lab, RPI)
>> >
>> >
>
>


More information about the Insight-users mailing list