[Insight-developers] problem with ProcessObject::GenerateOutputInformtion()

Lydia Ng lng at statsci.com
Tue Nov 28 14:13:11 EST 2000


Hi Will,

> Good catch. I'm curious (as an aside), does
> 
> >When the input and output images are of different types
> >CopyInformation() causes an access violation in VC++.
> 
> an exception get thrown, and are you trying to catch it?
> Also, the images are different in the sense that they are of
> different dimension, is this correct?
> 

An exception is thrown when CopyInformation() tries to
set the LargestPossibleRegion. CopyInformation() catches this
and returns. 

The net effect is that the information for the output is
undefined causing problems later on in the process.

I am not doing any catching of my own.

In my case, the images are different in the sense of
different pixel types. The same problem occurs for
different dimension too.


> We could create a GenerateOutputInformation in 
> itkFilterImageToImage and 
> FilterMeshToMesh which would probably work for most cases, and then 
> override it if the filter changes output.

I think iktFilterImageToImage and FilterMeshToMesh are good
places to have a default GenerateOutputInformation since the
input and output types are known.

This raises another question. Should the ProcessObject have an
implementation of GenerateOutputInformation at all? If so,
what should it do given it knows nothing about the types
of its inputs and outputs.

Cheers,
Lydia

 





More information about the Insight-developers mailing list