<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Hi Ivan,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">first the reformatted code:</div><div class="gmail_default" style="font-family:verdana,sans-serif"><pre style="color:rgb(0,0,0);font-family:"courier new""><span style="color:rgb(0,0,128);font-weight:bold">import </span>org.itk.simple.*;<br><span style="color:rgb(0,0,128);font-weight:bold">class </span>PatchBasedDenoisingImageFilter {<br> <span style="color:rgb(0,0,128);font-weight:bold">public<br></span><span style="color:rgb(0,0,128);font-weight:bold"> static void </span>main(String argv[]) {<br> <span style="color:rgb(0,0,128);font-weight:bold">if </span>(argv.length < <span style="color:rgb(0,0,255)">5</span>) {<br> System.out.println(<span style="color:rgb(0,128,0);font-weight:bold">"Immetti prima:"</span>);<br> <span style="color:rgb(0,0,128);font-weight:bold">return</span>;<br> }<br> org.itk.simple.ImageFileReader reader =<br> <span style="color:rgb(0,0,128);font-weight:bold">new </span>org.itk.simple.ImageFileReader();<br> reader.setFileName(argv[<span style="color:rgb(0,0,255)">0</span>]);<br> Image img = reader.execute();<br> org.itk.simple.PatchBasedDenoisingImageFilter filter = <br> <span style="color:rgb(0,0,128);font-weight:bold">new </span>org.itk.simple.PatchBasedDenoisingImageFilter();<br> filter.setPatchRadius(Long.valueOf(argv[<span style="color:rgb(0,0,255)">1</span>]).longValue());<br> filter.setNoiseSigma(Double.valueOf(argv[<span style="color:rgb(0,0,255)">2</span>]).doubleValue());<br> filter.setNumberOfIterations(Long.valueOf(argv[<span style="color:rgb(0,0,255)">3</span>]).longValue());<br> Image blurredImg = filter.execute(img);<br> CastImageFilter caster = <span style="color:rgb(0,0,128);font-weight:bold">new </span>CastImageFilter();<br> caster.setOutputPixelType(img.getPixelIDValue());<br> Image castImg = caster.execute(blurredImg);<br> ImageFileWriter writer = <span style="color:rgb(0,0,128);font-weight:bold">new </span>ImageFileWriter();<br> writer.setFileName(argv[<span style="color:rgb(0,0,255)">4</span>]);<br> writer.execute(castImg);<br> }<br>}</pre></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Have you tried one of these:</div><div class="gmail_default"><pre style="font-family:"courier new";color:rgb(0,0,0)">filter.setNoiseModel(NoiseModelType.RICIAN);</pre><pre style="color:rgb(0,0,0)"><pre style="font-family:"courier new"">filter.setNoiseModel(<span style="color:rgb(0,0,255)">2</span>);</pre><pre><font face="verdana, sans-serif">Regards,</font></pre><pre><font face="verdana, sans-serif">Dženan</font></pre></pre></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 29, 2016 at 4:40 AM, ivan <span dir="ltr"><<a href="mailto:ivan.granata.na@gmail.com" target="_blank">ivan.granata.na@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">i don't understand how i can specify NoiseModelType ('Rician') in my java<br>
code<br>
<br>
<br>
this is my code<br>
<br>
<br>
import org.itk.simple.*; class PatchBasedDenoisingImageFilter { public<br>
static void main(String argv[]) { if ( argv.length < 5 ) {<br>
System.out.println("Immetti prima:<br>
"); return; } org.itk.simple.ImageFileReader reader = new<br>
org.itk.simple.<wbr>ImageFileReader(); reader.setFileName(argv[0]); Image img =<br>
reader.execute(); org.itk.simple.<wbr>PatchBasedDenoisingImageFilter filter = new<br>
org.itk.simple.<wbr>PatchBasedDenoisingImageFilter<wbr>(); filter.setPatchRadius<br>
(Long.valueOf( argv[1] ).longValue() ); filter.setNoiseSigma<br>
(Double.valueOf( argv[2] ).doubleValue() ); filter.setNumberOfIterations<br>
(Long.valueOf( argv[3] ).longValue() ); Image blurredImg =<br>
filter.execute(img); CastImageFilter caster = new CastImageFilter();<br>
caster.setOutputPixelType( img.getPixelIDValue() ); Image castImg =<br>
caster.execute( blurredImg ); ImageFileWriter writer = new<br>
ImageFileWriter(); writer.setFileName(argv[4]); writer.execute( castImg ); }<br>
}<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://itk-users.7.n7.nabble.com/PatchBasedDenoisingImageFilter-Funciton-NoiseModel-Java-SimpleITK-tp37598.html" rel="noreferrer" target="_blank">http://itk-users.7.n7.nabble.<wbr>com/<wbr>PatchBasedDenoisingImageFilter<wbr>-Funciton-NoiseModel-Java-<wbr>SimpleITK-tp37598.html</a><br>
Sent from the ITK - Users mailing list archive at Nabble.com.<br>
______________________________<wbr>_______<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK_<wbr>FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/insight-users</a><br>
</blockquote></div><br></div>