[Insight-developers] AnisotropicDiffusionImageFilter derived class Error

Johnson, Hans J hans-johnson at uiowa.edu
Fri Aug 30 09:57:33 EDT 2013


Antonio,

If you post the small example to a location like github or gitorious the
quality of response will be enormously improved.

Hans


-----Original Message-----
From: Matt McCormick <matt.mccormick at kitware.com>
Date: Friday, August 30, 2013 8:56 AM
To: Antonio Calabrese <calantoanto at gmail.com>
Cc: ITK <insight-developers at itk.org>
Subject: Re: [Insight-developers] AnisotropicDiffusionImageFilter derived
class Error

Hi Antonio,

Welcome to the list :-).

Please include a full example with code, CMakeLists.txt, and a short test.

Thanks,
Matt

On Fri, Aug 30, 2013 at 11:05 AM, Antonio Calabrese
<calantoanto at gmail.com> wrote:
> Hi to everyone
> it's my first time that i write on this mailing list. I'm a Italian
> Biomedical Engineer's student and i'm working on my final degree thesis.
> I'm implementing an Anisotropic Filter that i wrote few months ago in
> Matlab.
> This filter is different from the other ITK's filters, because i try to
> create an "automatic anisotropic filter" in which i don't need to set
> conductance and number of iteration parameters, because the filter
> calculates them alone.
> Here below there's a part of my code where i tried to implementing the
>ITK's
> AnisotropicDiffusionImageFilter.
>
> This's the class's derivation :
> namespace itk
> {
>     template< class TInputImage, class TIOutputImage>
>     class ITK_EXPORT MyAnisotropicDiffusionImageFilter:
>     public AnisotropicDiffusionImageFilter<TInputImage, TIOutputImage>
>     {
>     public:
>         /** Standard class typedefs. */
>         typedef MyAnisotropicDiffusionImageFilter Self;
>         typedef AnisotropicDiffusionImageFilter<TInputImage,
>TIOutputImage>
> Superclass;
>         typedef SmartPointer< Self >       Pointer;
>         typedef SmartPointer< const Self > ConstPointer;
>
>
>
>         /** Standard method for creation through object factory. */
>         itkNewMacro(Self);
>
>
>
>         /** Extract superclass image dimension. */
>         itkStaticConstMacro(ImageDimension, unsigned int,
>                             Superclass::ImageDimension);
>
>
>
> #ifdef ITK_USE_CONCEPT_CHECKING
>         /** Begin concept checking */
>         itkConceptMacro( OutputHasNumericTraitsCheck,
>                         ( Concept::HasNumericTraits< typename
> TInputImage::PixelType > ) );
>         /** End concept checking */
> #endif
>
>
>
>     }; // end namspace itk
> }
>
> and this is its implementation
>
> typedef itk::MyAnisotropicDiffusionImageFilter <FloatImageType,
> FloatImageType> MyAnisotropicDiffusionImageFilterType;
> MyAnisotropicDiffusionImageFilterType::Pointer
> myAnisotropicDiffusionFilterPointer =
> MyAnisotropicDiffusionImageFilterType::New();
>
> myAnisotropicDiffusionFilterPointer->SetInput(workImagePointer);
>
> myAnisotropicDiffusionFilterPointer->SetConductanceParameter(C);
> myAnisotropicDiffusionFilterPointer->SetTimeStep(Time_step);
> myAnisotropicDiffusionFilterPointer->SetNumberOfIterations(1);
> myAnisotropicDiffusionFilterPointer->Update();
>
> For the first time i subclassed it, and i don't have the experience to
> understand which is the wrong thing that return me an error.
>
> My filter crashes in an inheritance of the itkFiniteDifferenceImageFilter
> where it dies when it reaches this point:
> // Get the size of the neighborhood on which we are going to operate.
>This
> // radius is supplied by the difference function we are using.
> RadiusType radius = this->GetDifferenceFunction()->GetRadius();
>
> So, which is my error? Please someone give me a help.
> Regards Antonio Calabrese.
>
> _______________________________________________
> 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://kitware.com/products/protraining.php
>
> 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-developers
>
_______________________________________________
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://kitware.com/products/protraining.php

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-developers



________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________


More information about the Insight-developers mailing list