[Insight-developers] filter questions

Miller, James V (CRD) millerjv at crd.ge.com
Wed Nov 8 09:09:51 EST 2000


Lydia,

1) To override the output requested region, you need to implement the method
EnlargeOutputRequestedRegion().  This routine allows a filter to change the size of the output
requested region.  It should only make the region bigger (and should only change the output requested
region ivar). This is the routine you would use if your filter could only produce a full slice of an
image at a time or had to process the entire dataset at once. This method is called by
ProcessObject::PropagateRequestedRegion() and is called before GenerateInputRequestedRegion(), i.e. a
filter is asked to produce a given output, it will first enlarge that request if it needs to, then it
will determine how much input data it needs to produce that enlarged output.

2) My bad.  It should have been GetOutput(). Thanks.

   This just happened to work because the first thing we did was call the superclass's method which
copied this information from output to input.  Then our routine happened to modify the information in
an order which did not result in inconsistent information.

3) Don't know about this one.

Jim


-----Original Message-----
From: Lydia Ng [mailto:lng at statsci.com]
Sent: Tuesday, November 07, 2000 6:24 PM
To: Insight-developers at public.kitware.com
Subject: [Insight-developers] filter questions


Hi,

I have a few filter related questions:

1) Suppose a filter wants to override the output requested region.
Where should this override take place, in GenerateOutputInformation,
UpdateOutputInformation or in the GenerateData function?


2) In function GenerateInputRequestedRegion()
on line 110 of itkShrinkImage.txx we have:

  OutputImagePointer outputPtr = this->GetInput();

Why is it GetInput() instead of GetOutput()?

Ditto line 115 of itkNonThreadedShrinkImage.txx


3) FilterImageBinary used to allocate memory for the output data
in GenerateData(), it doesn't anymore. Why the change?


Thanks,
Lydia

_______________________________________________
Insight-developers mailing list
Insight-developers at public.kitware.com
http://public.kitware.com/mailman/listinfo/insight-developers




More information about the Insight-developers mailing list