<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><font face="Times New Roman">Hi to everyone</font><div><font face="Times New Roman"><span style="text-align: center; ">it's my first time that i write on this </span><span style="text-align: center; background-color: rgb(255, 255, 255); ">mailing list. I'm a Italian Biomedical Engineer's student and i'm working on my final degree thesis.</span></font><div><span style="background-color: rgb(255, 255, 255); font-size: 12px; text-align: center; "><font face="Times New Roman">I'm implementing an Anisotropic Filter that i wrote few months ago in Matlab.</font></span></div><div><font face="Times New Roman"><span style="background-color: rgb(255, 255, 255); text-align: center; ">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 </span>conductance<span style="background-color: rgb(255, 255, 255); text-align: center; "> and number of iteration parameters, </span>because the filter calculates them alone.</font></div></div><div style="text-align: -webkit-auto;"><font face="Times New Roman"><span style="background-color: rgb(255, 255, 255); text-align: center; ">Here below there's a part of my code where i tried to implementing the ITK's </span>AnisotropicDiffusionImageFilter. </font></div><div><font face="Times New Roman"><br></font></div><div><font face="Times New Roman">This's the class's derivation :</font></div><div><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman">namespace itk</font></div><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman">{</font></div><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman"> template< class TInputImage, class TIOutputImage></font></div><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman"> class ITK_EXPORT MyAnisotropicDiffusionImageFilter:</font></div><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman"> public AnisotropicDiffusionImageFilter<TInputImage, TIOutputImage></font></div><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman"> {</font></div><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman"> public:</font></div><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman"> /** Standard class typedefs. */</font></div><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman"> typedef MyAnisotropicDiffusionImageFilter Self;</font></div><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman"> typedef AnisotropicDiffusionImageFilter<TInputImage, TIOutputImage> Superclass;</font></div><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman"> typedef SmartPointer< Self > Pointer;</font></div><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman"> typedef SmartPointer< const Self > ConstPointer;</font></div><p style="margin: 0px; font-size: 11px; min-height: 13px; "><font face="Times New Roman"> <br class="webkit-block-placeholder"></font></p><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman"> /** Standard method for creation through object factory. */</font></div><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman"> itkNewMacro(Self);</font></div><p style="margin: 0px; font-size: 11px; min-height: 13px; "><font face="Times New Roman"> <br class="webkit-block-placeholder"></font></p><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman"> /** Extract superclass image dimension. */</font></div><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman"> itkStaticConstMacro(ImageDimension, unsigned int,</font></div><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman"> Superclass::ImageDimension);</font></div><p style="margin: 0px; font-size: 11px; min-height: 13px; "><font face="Times New Roman"> <br class="webkit-block-placeholder"></font></p><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman">#ifdef ITK_USE_CONCEPT_CHECKING</font></div><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman"> /** Begin concept checking */</font></div><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman"> itkConceptMacro( OutputHasNumericTraitsCheck,</font></div><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman"> ( Concept::HasNumericTraits< typename TInputImage::PixelType > ) );</font></div><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman"> /** End concept checking */</font></div><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman">#endif</font></div><p style="margin: 0px; font-size: 11px; min-height: 13px; "><font face="Times New Roman"> <br class="webkit-block-placeholder"></font></p><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman"> }; // end namspace itk</font></div><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman">}</font></div></div><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman"><br></font></div><div style="margin: 0px; "><font face="Times New Roman">and this is its implementation</font></div><div style="margin: 0px; "><font face="Times New Roman"><br></font></div><div style="margin: 0px; "><div style="margin: 0px; "><font face="Times New Roman">typedef itk::MyAnisotropicDiffusionImageFilter <FloatImageType, FloatImageType> MyAnisotropicDiffusionImageFilterType;</font></div><div style="font-size: 11px; margin: 0px; "><font face="Times New Roman">MyAnisotropicDiffusionImageFilterType::Pointer myAnisotropicDiffusionFilterPointer = MyAnisotropicDiffusionImageFilterType::New();</font></div><p style="font-size: 11px; margin: 0px; min-height: 13px; "><font face="Times New Roman">myAnisotropicDiffusionFilterPointer->SetInput(workImagePointer);</font></p><div style="font-size: 11px; margin: 0px; "><font face="Times New Roman">myAnisotropicDiffusionFilterPointer->SetConductanceParameter(C);</font></div><div style="font-size: 11px; margin: 0px; "><font face="Times New Roman">myAnisotropicDiffusionFilterPointer->SetTimeStep(Time_step);</font></div><div style="font-size: 11px; margin: 0px; "><font face="Times New Roman">myAnisotropicDiffusionFilterPointer->SetNumberOfIterations(1);</font></div><div style="font-size: 11px; margin: 0px; "><font face="Times New Roman">myAnisotropicDiffusionFilterPointer->Update();</font></div><div style="font-size: 11px; margin: 0px; "><font face="Times New Roman"><br></font></div><div style="margin: 0px; "><font face="Times New Roman">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.</font></div><div style="margin: 0px; "><font face="Times New Roman"><br></font></div><div style="margin: 0px; "><font face="Times New Roman">My filter crashes in an inheritance of the itkFiniteDifferenceImageFilter where it dies when it reaches this point:</font></div><div style="margin: 0px; "><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman">// Get the size of the neighborhood on which we are going to operate. This</font></div><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman">// radius is supplied by the difference function we are using.</font></div><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman">RadiusType radius = this->GetDifferenceFunction()->GetRadius();</font></div><div style="margin: 0px; font-size: 11px; "><font face="Times New Roman"><br></font></div><div style="margin: 0px; "><font face="Times New Roman"><span style="font-size: medium; ">So, which is my error? Please someone give me a help.</span> </font></div><div style="margin: 0px; "><font face="Times New Roman">Regards Antonio Calabrese.</font></div></div></div></body></html>