[Insight-users] Computing the gradient of a vector image

Luis Ibanez luis.ibanez at kitware.com
Fri Dec 10 05:44:42 EST 2010


Hi David,

The gradient of a vector image could have different interpretations...

The Gradient of a scalar image will be an image of covariant vectors.

The Gradient of a vector image will be an image of Tensors
one of whose indices will be covariant and the other contravariant.

Are you looking for a filter that will produce an image of
tensors as output ?


     Please let us know,


          Thanks


                   Luis

---------------------------------------
On Fri, Dec 3, 2010 at 2:20 PM, David Doria <daviddoria at gmail.com> wrote:
> I have an image of type:
>
> typedef itk::CovariantVector<float, 2> VectorType;
> typedef itk::Image<VectorType, 2>   VectorImageType;
>
> that I need to compute the gradient of.
>
> I tried this:
>
>  typedef itk::GradientImageFilter<
>      VectorImageType, VectorType>  GradientFilterType;
>  GradientFilterType::Pointer gradientFilter = GradientFilterType::New();
>
> but I get concept checking errors like:
>
> itkConceptChecking.h:185: error: invalid static_cast from type
> ‘itk::CovariantVector<float, 2u>’ to type ‘float’
>
> There should be no problem subtracting two vectors to produce an
> output vector (of vectors) as the gradient right? I.e. the first
> component of the output (gradient in x direction) should be a vector,
> the second component of the output should be another vector (gradient
> in the y direction), etc.
>
> Here is what I tried:
> http://www.itk.org/Wiki/ITK/Examples/Broken/ImageProcessing/GradientOfVectorImage
>
> Is there a reason that this isn't allowed?
>
> David
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>


More information about the Insight-users mailing list