<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><font size="4">Hi Dženan and Kris;</font> <BR>First of all thank you both for the fast and helpfully reply!<BR> <BR>Now I have tried more iterations an it seems to work fine. And when I checked my result with just 1 iteration, I really recognized some very lil changes of the image like <font size="4">Dženan has predicted to me. But I have still two more questions. If I do not define any subsamples, will the algorithm perform the comparison for each pixel through the whole image? </font><BR><font size="4"></font> <BR>And the second question which arises is, when I checked the doxygen documentation for the itkPatchBasedDenoisingImageFilter it is said, that the methods of the filter stem on the following sources:<BR> <BR><a href="http://www.itk.org/Doxygen/html/classitk_1_1PatchBasedDenoisingImageFilter.html">http://www.itk.org/Doxygen/html/classitk_1_1PatchBasedDenoisingImageFilter.html</a><BR> <BR>"Suyash P. Awate, Ross T. Whitaker. Unsupervised, Information-Theoretic, Adaptive <a title="Templated n-dimensional image class. " class="el" href="http://www.itk.org/Doxygen/html/classitk_1_1Image.html">Image</a> Filtering for <a title="Templated n-dimensional image class. " class="el" href="http://www.itk.org/Doxygen/html/classitk_1_1Image.html">Image</a> Restoration. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI) 2006; 28(3):364-376."<BR> <BR>"Suyash P. Awate, Ross T. Whitaker. Higher-Order <a title="Templated n-dimensional image class. " class="el" href="http://www.itk.org/Doxygen/html/classitk_1_1Image.html">Image</a> <a class="el" href="http://www.itk.org/Doxygen/html/namespaceitk_1_1Statistics.html">Statistics</a> for Unsupervised, Information-Theoretic, Adaptive, <a title="Templated n-dimensional image class. " class="el" href="http://www.itk.org/Doxygen/html/classitk_1_1Image.html">Image</a> Filtering. IEEE Int. Conf. Computer Vision and Pattern Recognition (CVPR) 2005; (2):44-51."<BR> <BR>And the documentation of the base class (itkPatchBasedDenoisingBaseImageFilter) of this filter says that the methods stems on the following sources:<BR> <BR><a href="http://www.itk.org/Doxygen/html/classitk_1_1PatchBasedDenoisingBaseImageFilter.html">http://www.itk.org/Doxygen/html/classitk_1_1PatchBasedDenoisingBaseImageFilter.html</a><br>"<BR>Suyash P. Awate, Ross T. Whitaker. Higher-Order <a title="Templated n-dimensional image class. " class="el" href="http://www.itk.org/Doxygen/html/classitk_1_1Image.html">Image</a> <a class="el" href="http://www.itk.org/Doxygen/html/namespaceitk_1_1Statistics.html">Statistics</a> for Unsupervised, Information-Theoretic, Adaptive, <a title="Templated n-dimensional image class. " class="el" href="http://www.itk.org/Doxygen/html/classitk_1_1Image.html">Image</a> Filtering. IEEE Int. Conf. Computer Vision and Pattern Recognition (CVPR) 2005; (2):44-51.<BR> <BR>Antoni Buades, Bartomeu Coll, Jean-Michel Morel. A Non-Local Algorithm for <a title="Templated n-dimensional image class. " class="el" href="http://www.itk.org/Doxygen/html/classitk_1_1Image.html">Image</a> Denoising. IEEE Int. Conf. Computer Vision and Pattern Recognition (CVPR) 2005; (2):60-65.<BR> <BR>While the former work considers the denoising algorithm as performing entropy reduction using nonparametric density estimation, the latter work treats it as nonparametric regression. <a class="el" href="http://www.itk.org/Doxygen/html/namespaceDetails.html">Details</a> underlying this class of methods appear in:<BR> <BR>Suyash P. Awate, Ross T. Whitaker. Unsupervised, Information-Theoretic, Adaptive <a title="Templated n-dimensional image class. " class="el" href="http://www.itk.org/Doxygen/html/classitk_1_1Image.html">Image</a> Filtering for <a title="Templated n-dimensional image class. " class="el" href="http://www.itk.org/Doxygen/html/classitk_1_1Image.html">Image</a> Restoration. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI) 2006; 28(3):364-376.<BR>Antoni Buades, Bartomeu Coll, Jean-Michel Morel. Nonlocal <a title="Templated n-dimensional image class. " class="el" href="http://www.itk.org/Doxygen/html/classitk_1_1Image.html">Image</a> and Movie Denoising. International Journal of Computer Vision (IJCV) 2008; 76(2):123-139."<BR> <BR>Now I am asking my self which algorithm is used for the methods in the base class? The entropy minimizing algorithm or the "normal" non-local means filter proposed in the "A Non-Local Algorithm for Image Denoising" ? <br> <BR><div><hr id="stopSpelling">From: dzenanz@gmail.com<br>Date: Tue, 19 Apr 2016 12:47:50 -0400<br>Subject: Re: [ITK] Some Troubles with the itkPatchBasedDenoisingImageFilter<br>To: aklos@outlook.de<br>CC: community@itk.org<br><br><div dir="ltr"><div class="ecxgmail_default" style="font-family: verdana,sans-serif; font-size: small;">Hi Andreas,</div><div class="ecxgmail_default" style="font-family: verdana,sans-serif; font-size: small;"><br></div><div class="ecxgmail_default" style="font-family: verdana,sans-serif; font-size: small;">I can confirm that this filter is slow (even in release mode). However, the output is not the same as input, there are some slight differences (e.g. input value 248 for some pixel turns into 249). Not all pixels get changed with the test image I used. The code I used is attached.</div><div class="ecxgmail_default" style="font-family: verdana,sans-serif; font-size: small;"><br></div><div class="ecxgmail_default" style="font-family: verdana,sans-serif; font-size: small;">Regards</div></div><div class="ecxgmail_extra"><br><div class="ecxgmail_quote">On Mon, Apr 18, 2016 at 6:18 PM, Andreas Klos <span dir="ltr"><<a href="mailto:aklos@outlook.de" target="_blank">aklos@outlook.de</a>></span> wrote:<br><blockquote class="ecxgmail_quote" style="padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;">
<div><div dir="ltr">Dear great ITK- Community,<br>Currently I am struggeling with the "itkPatchBasedDenoisingImageFilter". I try to use this filter but it does not work for me at the moment. I try to process a 16bit dicom Image with this denoising filter. <br> <br>Currently when i try to apply this filter my computer seems to be very busy for several minutes. But the result of the computation is the same like the original data. As if there where no processing step performed on the image.<br> <br>So the question is, do I have to downsample my image to 8 bit image? or do I have to do a special weigthing when I work with 16 bit images? Or is there something special which I should consider when I use this filter?<br><br>Because there is no real example about this filter I also have some questions on how to configure this filter to use it in an efficient way. <br>When I took a look in the doxygen of itk about this filter I read this sentence "It implements schemes for random sampling of patches non-locally (from the entire image)...". Do I understand it right that I can use subsamples of an image to create a searchwindow to reduce the computational time? <br><br>It would be very greatful if someone can help me to get a clear mind about this filter and how to apply it correctly.<br><br>Below is my current not really satisfying code where I try to determine my search window and the patch size.<br> <br>Best Regards,<br>Andreas<br><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><br><font color="#569cd6" face="Consolas" size="2"><font color="#569cd6" face="Consolas" size="2"><font color="#569cd6" face="Consolas" size="2">typedef</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">itk</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">::</font></font></font><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2">Image</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><</font></font></font><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2">PixelType</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">,</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#b5cea8" face="Consolas" size="2"><font color="#b5cea8" face="Consolas" size="2"><font color="#b5cea8" face="Consolas" size="2">2</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">></font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2">ImageType2D</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">;</font></font></font><br> <br><font color="#569cd6" face="Consolas" size="2"><font color="#569cd6" face="Consolas" size="2"><font color="#569cd6" face="Consolas" size="2">typedef</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">itk</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">::</font></font></font><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2">PatchBasedDenoisingImageFilter</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><</font></font></font><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2">ImageType2D</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">,</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2">ImageType2D</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">></font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2">PatchBasedDenoisingFilterType</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">;</font></font></font><br><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">
</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"></font></font></font><br><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#569cd6" face="Consolas" size="2"><font color="#569cd6" face="Consolas" size="2"><font color="#569cd6" face="Consolas" size="2">typedef</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">itk</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">::</font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">Statistics</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">::</font></font></font><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2">GaussianRandomSpatialNeighborSubsampler</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><</font></font></font><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2">PatchBasedDenoisingFilterType</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">::</font></font></font><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2">PatchSampleType</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">,</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2">ImageType2D</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">::</font></font></font><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2">RegionType</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">></font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2">SamplerType</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">;</font></font></font><br> <br><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2">PatchBasedDenoisingFilterType</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">::</font></font></font><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2">Pointer</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#dadada" face="Consolas" size="2"><font color="#dadada" face="Consolas" size="2"><font color="#dadada" face="Consolas" size="2">denoisingImageFilter<font color="#b4b4b4">=</font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2">PatchBasedDenoisingFilterType</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">::</font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">New</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">();</font></font></font></font></font></font><br><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">
</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"></font></font></font><br><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2">SamplerType</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">::</font></font></font><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2">Pointer</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#dadada" face="Consolas" size="2"><font color="#dadada" face="Consolas" size="2"><font color="#dadada" face="Consolas" size="2">sampler<font color="#dcdcdc"> </font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">=</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2">SamplerType</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">::</font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">New</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">();</font></font></font></font></font></font><br><font color="#b4b4b4" face="Consolas" size="2"></font> <br><font color="#b4b4b4" face="Consolas" size="2">//The value for the patchRadius is provided by the user through a GUI</font><br><font color="#b4b4b4" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#569cd6" face="Consolas" size="2"><font color="#569cd6" face="Consolas" size="2"><font color="#569cd6" face="Consolas" size="2">double</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">dataArray</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">[1</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">];</font></font></font><br><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">
</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"></font></font></font><br><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">dataArray</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">[</font></font></font><font color="#b5cea8" face="Consolas" size="2"><font color="#b5cea8" face="Consolas" size="2"><font color="#b5cea8" face="Consolas" size="2">0</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">]</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">=</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#7f7f7f" face="Consolas" size="2"><font color="#7f7f7f" face="Consolas" size="2"><font color="#7f7f7f" face="Consolas" size="2">_patchSize;</font></font></font><br></font> <br><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">itk</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">::</font></font></font><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2">Array</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><</font></font></font><font color="#569cd6" face="Consolas" size="2"><font color="#569cd6" face="Consolas" size="2"><font color="#569cd6" face="Consolas" size="2">double</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">></font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#dadada" face="Consolas" size="2"><font color="#dadada" face="Consolas" size="2"><font color="#dadada" face="Consolas" size="2">dArray</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">;</font></font></font><br><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><br><font color="#dadada" face="Consolas" size="2"><font color="#dadada" face="Consolas" size="2"><font color="#dadada" face="Consolas" size="2">dArray</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">.</font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">SetData</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">(</font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">dataArray</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">);</font></font></font><br><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#dadada" face="Consolas" size="2"><font color="#dadada" face="Consolas" size="2"><font color="#dadada" face="Consolas" size="2">denoisingImageFilter</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">-></font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">SetInput</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">(</font></font></font><font color="#dadada" face="Consolas" size="2"><font color="#dadada" face="Consolas" size="2"><font color="#dadada" face="Consolas" size="2">inputImage</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">);</font></font></font><br><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">
</font></font></font><br><font face="Consolas"><font size="2"><font color="#b4b4b4">//Here I set my PatchRadius. my default value is 7 </font></font></font><br><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#dadada" face="Consolas" size="2"><font color="#dadada" face="Consolas" size="2"><font color="#dadada" face="Consolas" size="2">denoisingImageFilter</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">-></font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">SetPatchRadius</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">(</font></font></font><font color="#dadada" face="Consolas" size="2"><font color="#dadada" face="Consolas" size="2"><font color="#dadada" face="Consolas" size="2">dArray</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">[</font></font></font><font color="#b5cea8" face="Consolas" size="2"><font color="#b5cea8" face="Consolas" size="2"><font color="#b5cea8" face="Consolas" size="2">0</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">]);</font></font></font><br><font color="#b4b4b4" face="Consolas" size="2"></font> <br><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">
</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2">
//Here I try to define a searchwindow to reduce the computational time </font></font></font><br><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#dadada" face="Consolas" size="2"><font color="#dadada" face="Consolas" size="2"><font color="#dadada" face="Consolas" size="2">sampler</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">-></font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">SetRadius</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">(</font></font></font><font color="#b5cea8" face="Consolas" size="2"><font color="#b5cea8" face="Consolas" size="2"><font color="#b5cea8" face="Consolas" size="2">21</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">);</font></font></font><br><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">
</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"></font></font></font><br><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#dadada" face="Consolas" size="2"><font color="#dadada" face="Consolas" size="2"><font color="#dadada" face="Consolas" size="2">denoisingImageFilter</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">-></font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">SetSampler</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">(</font></font></font><font color="#dadada" face="Consolas" size="2"><font color="#dadada" face="Consolas" size="2"><font color="#dadada" face="Consolas" size="2">sampler</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">);</font></font></font><br><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">
</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"></font></font></font><br><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#569cd6" face="Consolas" size="2"><font color="#569cd6" face="Consolas" size="2"><font color="#569cd6" face="Consolas" size="2">try</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">{</font></font></font><br><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">
</font></font></font><br><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#dadada" face="Consolas" size="2"><font color="#dadada" face="Consolas" size="2"><font color="#dadada" face="Consolas" size="2">denoisingImageFilter</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">-></font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">Update</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">();</font></font></font><br><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">
</font></font></font><br><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">}</font></font></font><br><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">
</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"></font></font></font><br><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#569cd6" face="Consolas" size="2"><font color="#569cd6" face="Consolas" size="2"><font color="#569cd6" face="Consolas" size="2">catch</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">(</font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">itk</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">::</font></font></font><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2"><font color="#4ec9b0" face="Consolas" size="2">ExceptionObject</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">error</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">){</font></font></font><br><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">
</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"></font></font></font><br><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">std</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">::</font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">cerr</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><<</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#d69d85" face="Consolas" size="2"><font color="#d69d85" face="Consolas" size="2"><font color="#d69d85" face="Consolas" size="2">"An ExceptionObject was caught!"</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><<</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">std</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">::</font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">endl</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">;</font></font></font><br><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">
</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"></font></font></font><br><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">std</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">::</font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">cerr</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><<</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">error</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><<</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">std</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">::</font></font></font><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2"><font color="#c8c8c8" face="Consolas" size="2">endl</font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">;</font></font></font><br><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">
</font></font></font><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"></font></font></font><br><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"><font color="#dcdcdc" face="Consolas" size="2"> </font></font></font><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2"><font color="#b4b4b4" face="Consolas" size="2">}</font></font></font><br><font color="#b4b4b4" face="Consolas" size="2"></font> <br><font color="#b4b4b4" face="Consolas" size="2"></font> <br><font color="#b4b4b4" face="Consolas" size="2" style="background-color: rgb(255, 255, 255);"><font color="#b4b4b4" face="Consolas" size="2" style="background-color: rgb(255, 255, 255);"></font> <br></font> </div></div>
<br>_______________________________________________<br>
Community mailing list<br>
<a href="mailto:Community@itk.org">Community@itk.org</a><br>
<a href="http://public.kitware.com/mailman/listinfo/community" target="_blank" rel="noreferrer">http://public.kitware.com/mailman/listinfo/community</a><br>
<br></blockquote></div><br></div></div> </div></body>
</html>