[Insight-users] RV: about HessianRecursiveGaussianImageFilter

Neil Panjwani paniwani at gmail.com
Sat May 14 16:07:41 EDT 2011


Sorry, typo:

The for loop that iterators the image should be:

for (eigenImageIt.GoToBegin(); !eigenImageIt.IsAtEnd(); ++*eigenImageIt*)


On Sat, May 14, 2011 at 4:05 PM, Neil Panjwani <paniwani at gmail.com> wrote:

> If you look at the relevant typedefs,
>
> const     unsigned int        Dimension       =  3;
> ...
> typedef   itk::FixedArray< InputPixelType, Dimension >
>  EigenValueArrayType;
>  typedef   itk::Image< EigenValueArrayType, Dimension
> > EigenValueImageType;
> typedef
> itk::SymmetricEigenAnalysisImageFilter< HessianFilterType::OutputImageType, EigenValueImageType
> >EigenAnalysisFilterType;
>
> you see that the output of the EigenAnalysisFilterType is an image of Fixed
> Arrays of dimension 3. In order to access each eigenvalue, you simply
> traverse the image using an image iterator. When calling GetPixel(), you
> will be returned a Fixed Array which contains all three eigenvalues. Read up
> on the ITK software guide if you're unfamiliar with iterators and/or the
> documentation for ITK for specific classes.
>
> Here's what I would do:
>
> // get output
> EigenValueImageType::Pointer eigenImage = eigenAnalysisFilter->GetOutput();
>
> // setup iterator
> typedef itk::ImageRegionIterator<EigenValueImageType> EigenIteratorType;
> EigenIteratorType
> eigenImageIt(eigenImage,eigenImage->GetLargestPossibleRegion());
>
> // iterate through image and get each eigen value
> for (eigenImageIt.GoToBegin(); !eigenImageIt.IsAtEnd(); ++eigenImage)
> {
>  for (int i=0; i<3; i++)
> {
>   EigenValueArrayType eigenArray = eigenImageIt.Get();
>   std::cout << eigenArray[i] << std::endl;
>  }
> }
>
> On Sat, May 14, 2011 at 1:41 PM, ra.corredor <ra.corredor at gmail.com>wrote:
>
>> Hi Ivan,
>>
>> I'm just beginning  with ITK and I was testing your
>> HessianMatrixEigenAnalysis.cxx code in order to obtain the Hessian matrix
>> eigenvalues of a CT image. In my project, I need to save the three
>> eigenvalues in a text file using several Sigma values (about 10 scales).
>>
>> You wrote in the last post that is possible to access these values using
>> GetPixel, but what you mean is that eigenAnalysisFilter->GetOutput() is
>> producing this vector image which can be accessed with getPixel or
>> iteratiors?? I had some problems adding the little EigenValueAccessor
>> class
>> to my project, so I'm looking for alternative options for accessing
>> eigenvalues.
>>
>> Is it possible to use MultiScaleHessianBasedMeasureImageFilter to get this
>> info?
>>
>> Thank you !!
>>
>> Ricardo
>> RaC
>>
>>
>> -----
>> Ricardo A Corredor
>> RaC
>> --
>> View this message in context:
>> http://itk-insight-users.2283740.n2.nabble.com/RV-about-HessianRecursiveGaussianImageFilter-tp5239095p6363432.html
>> Sent from the ITK Insight Users mailing list archive at Nabble.com.
>> _____________________________________
>> 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
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110514/160f72a9/attachment.htm>


More information about the Insight-users mailing list