[ITK-users] extracting each component of the GradientRecursiveGaussianImageFilter

Pol Monsó Purtí lluna.nova at gmail.com
Fri Apr 17 10:01:31 EDT 2015


Apparently, even if the default is a covariantVector of dimension
ImageDimension (3), the three components of each "pixel" have the same
value. So the question is still there, how do I retrieve the gradient on
each dimension of an image?

2015-04-16 15:30 GMT+02:00 Pol Monsó Purtí <lluna.nova at gmail.com>:

> Hello all,
>
> The declaration of thefilter is
>
> template<typename TInputImage, typename TOutputImage = Image<
> CovariantVector< typename NumericTraits< typename TInputImage::PixelType
> >::RealType, TInputImage::ImageDimension >, TInputImage::ImageDimension >>
>
> In my case, ImageDimension = 3
>
> So I have two questions.
>
> Question number 1:
> Does the output image hold, for each pixel, the three derivatives? Can
> they be accessed by
>
> it.Get()[0] it.Get()[1] it.Get()[2]
>
> where it is itk::ImageRegionIterator< GradientImageType > it(
> gradientImage,
> gradientImage->GetRequestedRegion() );
>
> ?
>
> Question number 2: (just for curiosity)
> what happens when TOutputImage = Image< PixelType, Dimension> ?
> and what happens when you create a writer with the default TOutputImage and
> write to disk? Do the derivatives end in different channels or a magnitude
> is computed?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20150417/4e676e97/attachment.html>


More information about the Insight-users mailing list