[vtkusers] Error in vtkImageMultipleInputFilter.cxx

David Gobbi dgobbi at irus.rri.ca
Mon Nov 26 05:14:08 EST 2001


Hi Zeger,

I'm not sure what the problem is.  If you want different behaviour,
you should be able to define an ExecuteInformation() in your
subclass that sets up the information of the output however you want.
Many of the VTK filters define their own ExecuteInformation method.

If you are changing the output information by doing something like
  filter->GetOutput()->SetWholeExtent()
and you don't want the filter to change things, then you are using
VTK improperly.  A filter has complete control over its output, the
user should never make changes to the output data and/or the output
data information without first doing a SetSource(0) on the data to
permanently remove it from the filter.

 - David


On Mon, 26 Nov 2001, Zeger Knops wrote:

> Taken from vtkImageMultipleInputFilter.cxx line 140
>
> //----------------------------------------------------------------------
> ------
> void vtkImageMultipleInputFilter::ExecuteInformation()
> {
>   vtkImageData *output = this->GetOutput();
>   vtkImageData *input = this->GetInput(0);
>
>   if ( input == NULL || output == NULL)
>     {
>     return;
>     }
>
>   // Set the defaults from input1
>   output->CopyTypeSpecificInformation(input);
>
>   // Let the subclass modify the default.
>   this->ExecuteInformation((vtkImageData**)(this->Inputs), output);
> }
>
> Why is the output adjusted to the input? If I have a filter with a nxn
> input twice and I would like the output to be something else that won't
> work because of this. Is this a bug or is there a special reason to
> adjust the ouput.
>
> Zeger Knops




More information about the vtkusers mailing list