[Insight-users] AddPixelAccessor set function confusion

David Doria daviddoria at gmail.com
Thu Dec 9 22:12:33 EST 2010


On Thu, Dec 9, 2010 at 4:33 PM, robert tamburo <robert.tamburo at gmail.com> wrote:
> I'm confused with the set function of AddPixelAccessor. It subtracts a value
> from the input rather than adding it.
> Relevant code:
> inline void Set( InternalType & output, const ExternalType & input ) const
>     { output = static_cast<InternalType>( input - m_Value ); }
> Shouldn't it add m_Value to the input? Or is there something else going on?
> -Robert

Seems strange to me. But no more strange than the interface...

If someone can demonstrate the proper usage here (if this is not a bug):
http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/AddPixelAccessor

that would be great.

Also,

grep -ri AddPixelAccessor *

makes me think that this isn't used in any tests... probably a bad thing :)

David


More information about the Insight-users mailing list