MantisBT - ITK
View Issue Details
0004625ITKpublic2007-03-19 04:312010-10-21 12:31
Julien Michel 
Luis Ibanez 
normalmajoralways
closedfixed 
 
 
0004625: UnaryFunctorImageFilter breaks MetaDataDictionary handling through the execution pipeline
itk::UnaryFunctorImageFilter overrides the GenerateOutputInformation() method, but without calling the Superclass implementation (for dimension reasons).

As a result the CopyInformation(DataObject * data) method is not called from input to outputs. This causes metadata stored in the itk::MetaDataDictionary of the input to be lost whenever there is a filter deriving from itk::UnaryFunctorImageFilter in the pipeline.

This could be fixed by calling outputPtr->CopyInformation(inputPtr) in the GenerateOutputInformation() for instance.
No tags attached.
Issue History
2008-02-08 13:49Jim MillerAssigned ToLuis Ibanez => Jim Miller
2008-02-08 13:51Jim MillerNote Added: 0010436
2009-10-25 23:04Luis IbanezNote Added: 0018230
2009-10-25 23:04Luis IbanezAssigned ToJim Miller => Luis Ibanez
2009-10-25 23:05Luis IbanezNote Added: 0018231
2009-10-25 23:05Luis IbanezStatusassigned => resolved
2009-10-25 23:05Luis IbanezResolutionopen => fixed
2010-10-21 12:31Gabe HartStatusresolved => closed

Notes
(0010436)
Jim Miller   
2008-02-08 13:51   
The MetaDataDictionary is not passed through the pipeline because a filter cannot know whether the information still makes sense after it executes.

However, there have been many requests for the MetaDataDictionary to be passed. So we will add it. We need to put it in the CopyInformation() method of the data objects (high up in the hierarchy, for instance in DataObject) as well as add it to any filter that implements its own GenerateOutputInformation() method without calling the superclass method.
(0018230)
Luis Ibanez   
2009-10-25 23:04   
Julien Michel contributed a patch to fix this bug:
http://www.itk.org/pipermail/insight-users/2009-October/033293.html [^]

The patch was committed with:
http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/BasicFilters/itkUnaryFunctorImageFilter.txx?root=Insight&r1=1.32&r2=1.33&sortby=date [^]
(0018231)
Luis Ibanez   
2009-10-25 23:05   
An Experimental build submitted from macondo.kitware was green.