[Insight-users] itkWarpVectorImageFilter : fixed: Thanks

Luis Ibanez luis.ibanez at kitware.com
Fri Feb 25 18:48:05 EST 2005


Hi Bing,

Thanks for pointing this out, and providing a fix.

Your message has been registered as Bug # 1622 in the bug tracker.

A fix was committed following your instructions.


Please let us know if you find any other problem.


    Thanks


       Luis


------------------------------
Bing Jian wrote:

> Hi  Luis,         May I ask a request to update the 
> itkWarpVectorImageFilter class which was added to ITK library last year?
> First I would like to thank the author (Corinne Mattmann) for this 
> contribution. Now I am using this class extensively
> in my own program. But, as warned in the header file, this filter 
> assumes that the input type, output type and deformation
> field type all have the same number of dimensions, which restricts the 
> usage of this class. However,  it turns out that it
> is very simple to make it work in situations where image dimension maybe 
> different from the dimension of pixel vector.
> 
>       Below is what I did.  First just defined a new ConstMacro in the 
> header file:
> /** Determine the image dimension. */
>  itkStaticConstMacro(PixelDimension, unsigned int,
>                      PixelType::Dimension );
> 
>         and changed two places in the .txx file. The first one is in the 
> constructor
>  for (unsigned int i=0; i<ImageDimension; i++)
>    {
>    m_EdgePaddingValue[i] = 0;
>    }
>    ImageDimension ==> PixelDimension
> 
>     the next one is
>             for( unsigned int k = 0; k < ImageDimension; k++ )
>        {
>        outputValue[k] = static_cast<ValueType>( interpolatedValue[k] );
>        }
>   again, change ImageDimension to PixelDimension.
> 
>      The above minor changes work fine from my own experience.  But it 
> will cause
> trouble when somebody else tries to compile my code. To make it convenient,
> I really wish to see a quick update to this itkWarpVectorImageFilter class.
> Thanks in advance!
>    
> 
> 
> 
> 
> 
> 





More information about the Insight-users mailing list