<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; "><span style="font-family: 'Lucida Grande'; ">Excuse me if I'm answering only now, </span><div><span style="color: rgb(51, 51, 51); font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 17px; text-align: left; white-space: pre-wrap; background-color: rgb(255, 255, 255); ">I don't know if i can upload my code and an example image without some permission. I asked it to my Teacher and i'm waiting. I have to solve it as soon as possible so I'm going to express my problem in a better way than before:</span></div><div style="text-align: -webkit-auto;"><span style="color: rgb(51, 51, 51); font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 17px; text-align: left; white-space: pre-wrap; background-color: rgb(255, 255, 255); ">I guess that my problem is that the </span><font color="#333333" face="lucida grande, tahoma, verdana, arial, sans-serif"><span style="font-size: 13px; line-height: 17px; white-space: pre-wrap;">GetDifferenceFunction(), an itkFiniteDifferenceFuction's method, which return me a null pointer.</span></font></div><div style="text-align: -webkit-auto;"><span style="color: rgb(51, 51, 51); font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 17px; text-align: left; white-space: pre-wrap; background-color: rgb(255, 255, 255); ">I think I need to define the FiniteDifferenceFunction first and then pass it to my derived class.</span></div><div style="text-align: -webkit-auto;"><span style="color: rgb(51, 51, 51); font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 17px; text-align: left; white-space: pre-wrap; background-color: rgb(255, 255, 255); ">The point is that I don't know how make it.</span></div><div style="text-align: -webkit-auto;"><span style="color: rgb(51, 51, 51); font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 17px; text-align: left; white-space: pre-wrap; background-color: rgb(255, 255, 255); "><br></span></div><div style="text-align: -webkit-auto;"><span style="color: rgb(51, 51, 51); font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 17px; text-align: left; white-space: pre-wrap; background-color: rgb(255, 255, 255); ">Thanks a lot, </span></div><div style="text-align: -webkit-auto;"><span style="color: rgb(51, 51, 51); font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 17px; text-align: left; white-space: pre-wrap; background-color: rgb(255, 255, 255); ">Antonio.</span></div><div style="text-align: -webkit-auto;"><span style="color: rgb(51, 51, 51); font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 17px; text-align: left; white-space: pre-wrap; background-color: rgb(255, 255, 255); "><br></span></div><div><div><div>On 30/ago/2013, at 15:57, "Johnson, Hans J" <<a href="mailto:hans-johnson@uiowa.edu">hans-johnson@uiowa.edu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Antonio,<br><br>If you post the small example to a location like github or gitorious the<br>quality of response will be enormously improved.<br><br>Hans<br><br><br>-----Original Message-----<br>From: Matt McCormick <<a href="mailto:matt.mccormick@kitware.com">matt.mccormick@kitware.com</a>><br>Date: Friday, August 30, 2013 8:56 AM<br>To: Antonio Calabrese <<a href="mailto:calantoanto@gmail.com">calantoanto@gmail.com</a>><br>Cc: ITK <<a href="mailto:insight-developers@itk.org">insight-developers@itk.org</a>><br>Subject: Re: [Insight-developers] AnisotropicDiffusionImageFilter derived<br>class Error<br><br>Hi Antonio,<br><br>Welcome to the list :-).<br><br>Please include a full example with code, CMakeLists.txt, and a short test.<br><br>Thanks,<br>Matt<br><br>On Fri, Aug 30, 2013 at 11:05 AM, Antonio Calabrese<br><<a href="mailto:calantoanto@gmail.com">calantoanto@gmail.com</a>> wrote:<br><blockquote type="cite">Hi to everyone<br>it's my first time that i write on this mailing list. I'm a Italian<br>Biomedical Engineer's student and i'm working on my final degree thesis.<br>I'm implementing an Anisotropic Filter that i wrote few months ago in<br>Matlab.<br>This filter is different from the other ITK's filters, because i try to<br>create an "automatic anisotropic filter" in which i don't need to set<br>conductance and number of iteration parameters, because the filter<br>calculates them alone.<br>Here below there's a part of my code where i tried to implementing the<br>ITK's<br>AnisotropicDiffusionImageFilter.<br><br>This's the class's derivation :<br>namespace itk<br>{<br> template< class TInputImage, class TIOutputImage><br> class ITK_EXPORT MyAnisotropicDiffusionImageFilter:<br> public AnisotropicDiffusionImageFilter<TInputImage, TIOutputImage><br> {<br> public:<br> /** Standard class typedefs. */<br> typedef MyAnisotropicDiffusionImageFilter Self;<br> typedef AnisotropicDiffusionImageFilter<TInputImage,<br>TIOutputImage><br>Superclass;<br> typedef SmartPointer< Self > Pointer;<br> typedef SmartPointer< const Self > ConstPointer;<br><br><br><br> /** Standard method for creation through object factory. */<br> itkNewMacro(Self);<br><br><br><br> /** Extract superclass image dimension. */<br> itkStaticConstMacro(ImageDimension, unsigned int,<br> Superclass::ImageDimension);<br><br><br><br>#ifdef ITK_USE_CONCEPT_CHECKING<br> /** Begin concept checking */<br> itkConceptMacro( OutputHasNumericTraitsCheck,<br> ( Concept::HasNumericTraits< typename<br>TInputImage::PixelType > ) );<br> /** End concept checking */<br>#endif<br><br><br><br> }; // end namspace itk<br>}<br><br>and this is its implementation<br><br>typedef itk::MyAnisotropicDiffusionImageFilter <FloatImageType,<br>FloatImageType> MyAnisotropicDiffusionImageFilterType;<br>MyAnisotropicDiffusionImageFilterType::Pointer<br>myAnisotropicDiffusionFilterPointer =<br>MyAnisotropicDiffusionImageFilterType::New();<br><br>myAnisotropicDiffusionFilterPointer->SetInput(workImagePointer);<br><br>myAnisotropicDiffusionFilterPointer->SetConductanceParameter(C);<br>myAnisotropicDiffusionFilterPointer->SetTimeStep(Time_step);<br>myAnisotropicDiffusionFilterPointer->SetNumberOfIterations(1);<br>myAnisotropicDiffusionFilterPointer->Update();<br><br>For the first time i subclassed it, and i don't have the experience to<br>understand which is the wrong thing that return me an error.<br><br>My filter crashes in an inheritance of the itkFiniteDifferenceImageFilter<br>where it dies when it reaches this point:<br>// Get the size of the neighborhood on which we are going to operate.<br>This<br>// radius is supplied by the difference function we are using.<br>RadiusType radius = this->GetDifferenceFunction()->GetRadius();<br><br>So, which is my error? Please someone give me a help.<br>Regards Antonio Calabrese.<br><br>_______________________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br>http://kitware.com/products/protraining.php<br><br>Please keep messages on-topic and check the ITK FAQ at:<br>http://www.itk.org/Wiki/ITK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://www.itk.org/mailman/listinfo/insight-developers<br><br></blockquote>_______________________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br>http://kitware.com/products/protraining.php<br><br>Please keep messages on-topic and check the ITK FAQ at:<br>http://www.itk.org/Wiki/ITK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://www.itk.org/mailman/listinfo/insight-developers<br><br><br><br>________________________________<br>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.<br>________________________________<br></blockquote></div><br></div></body></html>