[Insight-developers] managing filter outputs
Joshua Cates
cates at cayenne.cs.utah.edu
Wed Sep 27 14:44:45 EDT 2000
Thanks Jim, this clears things up pretty well. Have the details of
message passing (requesting sizes of outputs of inputs, etc) between
filters been worked out yet?
Josh.
+--+--+--+--+--+--+--+--+--+--+--+--
Josh Cates
Department of Computer Science
University of Utah
Email: cates at cs.utah.edu
Phone:
URL: www.cs.utk.edu/~cates
--+--+--+--+--+--+--+--+--+--+--+---
On Mon, 25 Sep 2000, Miller, James V (CRD) wrote:
> Josh,
>
> itkRandomImageSource illustrates what a filter writer should provide. You can assume the output
> image is already available by the time execute is called. Currently, the memory for the output image
> has not been allocated by the time execute is called. You will have to call Image::Allocate() inside
> execute for now.
>
> The goal is for all the memory allocation to be performed prior to execute being called. We have not
> inserted that code yet since there are several optimizations that can be performed but are rather
> complicated (for instance, if a filter is run a second time and is required to produce the same
> amount of output data as the last time it executed, then we do not need to reallocate the memory).
>
> If you think the implementation is different from the above design (where the output object is
> available by the time execute is called) then let us know.
>
> Currently, as a filter writer, there may be as many as 4 functions that you may want to override in
> your filter. (The names are these are subject to change).
>
> 1. Execute - otherwise your filter will not be very interesting
>
> 2. ExecuteInformation - if you filter is going to change the configuration of the output (spacing,
> ImageSize, etc.) then override this method.
>
> 3. ComputeInputUpdateExtent - how much data do you need on input in order to produce the amount of
> data requested on output?
>
> 4. EnlargeOutputUpdateExtent - if you receive a request for a certain amount of output data but your
> filter needs to produce more than that, then provide an implementation for this function. Examples
> of cases where you would need this are filters that do not support streaming and must produce the
> entire output image, or filters that are more efficient is the image size is a power of 2.
>
> I hope to pin down new names, design, and implementation for these functions by Visualization 2000.
>
> Jim
>
More information about the Insight-developers
mailing list