<div dir="ltr">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?<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-04-16 15:30 GMT+02:00 Pol Monsó Purtí <span dir="ltr"><<a href="mailto:lluna.nova@gmail.com" target="_blank">lluna.nova@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hello all,<br><br></div>The declaration of thefilter is<br><br><span style="font-family:monospace,monospace">template<typename TInputImage, typename TOutputImage = Image< CovariantVector< typename NumericTraits< typename TInputImage::PixelType >::RealType, TInputImage::ImageDimension >, TInputImage::ImageDimension >><br></span><br></div><div>In my case, <span style="font-family:monospace,monospace">ImageDimension = 3<br></span><div><br></div></div><div></div>So I have two questions.<br><br></div>Question number 1: <br>Does the output image hold, for each pixel, the three derivatives? Can they be accessed by<br><br><span style="font-family:monospace,monospace">it.Get()[0] it.Get()[1] it.Get()[2]</span><br><br></div><div>where<span style="font-family:monospace,monospace"> it </span>is <span style="font-family:monospace,monospace">itk::ImageRegionIterator< GradientImageType > it( gradientImage, <br>gradientImage->GetRequestedRegion() );<br><br>?<br></span><span style="font-family:arial,helvetica,sans-serif"><br></span></div><div><span style="font-family:arial,helvetica,sans-serif">Question number 2: (just for curiosity)<br></span></div><div><span style="font-family:arial,helvetica,sans-serif">what happens when </span><span style="font-family:monospace,monospace">TOutputImage = Image< PixelType, Dimension> </span><span style="font-family:arial,helvetica,sans-serif">?<br></span></div><div><span style="font-family:arial,helvetica,sans-serif">and what happens when you create a writer with the default </span><span style="font-family:monospace,monospace">TOutputImage </span><span style="font-family:arial,helvetica,sans-serif">and write to disk? Do the derivatives end in different channels or a magnitude is computed?</span><span style="font-family:monospace,monospace"><br></span></div></div>
</blockquote></div><br></div>