[Insight-users] discreteGaussianImageFilter has
problemswithinteger images
Miller, James V (Research)
millerjv at crd.ge.com
Fri Apr 29 11:54:54 EDT 2005
Martin,
I just checked in changes to the DiscreteGaussianImageFilter
and the NeighborhoodOperatorImageFilter to support kernels with
a different pixel type than the pixel type of the image.
The DiscreteGaussian code is also using a streaming image filter.
The old mini-pipeline was:
Gx --> Gy --> Gz
Where Gx does a gaussian in x, Gy does a gaussian in y, etc.
Now the pipeline is:
Gx --> Gy --> Gz --> S
Where S is a StreamingImageFilter tacked onto the end of the
mini-pipeline. I set S->SetNumberOfStreamDivisions(ImageDimension*ImageDimension)
The StreamingImageFilter will request ImageDimension*ImageDimension subregions
to be pulled through the mini-pipeline and pieces the results back together.
Architecturally, this works because the each filter in this pipeline supports
RequestedRegions. The StreamingImageFilter sets a particular RequestedRegion
at the bottom of the mini-pipeline and the mini-pipeline only calculates that
subregion. The methods GenerateInputRequestedRegion(), EnlargeOutputRequestedRegion()
allow a filter to tell the pipeline whether it supports streaming. In
GenerateInputRequestedRegion(), a filter must tell the pipeline how much input
data its needs to generate the output RequestedRegion. For convolution type filters,
the input requested region is the output requested region padded by the radius of the
convolution kernel. If a filter needs all the input, it will set the input requested
region to the LargestPossibleRegion. In EnlargeOutputRequestedRegion(), the filter
has the opportunity to say whether it can generate just the portion of the image
requested. Some filters have to produce the entire output.
Jim
-----Original Message-----
From: Martin Urschler [mailto:martin at urschler.info]
Sent: Friday, April 29, 2005 9:35 AM
To: Miller, James V (Research)
Subject: Re: [Insight-users] discreteGaussianImageFilter has
problemswithinteger images
Jim,
thanks for your help and your hint on problems with memory mapped images,
I like this mailing list, because there is a number of people who really
care about this toolkit and its users...
Perhaps you could post a message as soon as this streaming rewrite of
the discreteGaussian is implemented? I would be interested in the
overall strategy that you are using (is there already a filter that has
a nice and clean streaming implementation which one could use as a
template?). However, regarding the DiscreteGaussian, in the meantime I
have replaced it in my code by the RecursiveGaussian since it is a
little faster and if you take care in implementing the mini-pipeline it
is possible to do with just a single temporary image.
bye,
Martin
More information about the Insight-users
mailing list