[ITK-users] PatchBasedDenoisingImageFilter Funciton NoiseModel (Java-SimpleITK)?
Dženan Zukić
dzenanz at gmail.com
Thu Sep 29 08:58:53 EDT 2016
Hi Ivan,
first the reformatted code:
import org.itk.simple.*;
class PatchBasedDenoisingImageFilter {
public
static void main(String argv[]) {
if (argv.length < 5) {
System.out.println("Immetti prima:");
return;
}
org.itk.simple.ImageFileReader reader =
new org.itk.simple.ImageFileReader();
reader.setFileName(argv[0]);
Image img = reader.execute();
org.itk.simple.PatchBasedDenoisingImageFilter filter =
new org.itk.simple.PatchBasedDenoisingImageFilter();
filter.setPatchRadius(Long.valueOf(argv[1]).longValue());
filter.setNoiseSigma(Double.valueOf(argv[2]).doubleValue());
filter.setNumberOfIterations(Long.valueOf(argv[3]).longValue());
Image blurredImg = filter.execute(img);
CastImageFilter caster = new CastImageFilter();
caster.setOutputPixelType(img.getPixelIDValue());
Image castImg = caster.execute(blurredImg);
ImageFileWriter writer = new ImageFileWriter();
writer.setFileName(argv[4]);
writer.execute(castImg);
}
}
Have you tried one of these:
filter.setNoiseModel(NoiseModelType.RICIAN);
filter.setNoiseModel(2);
Regards,
Dženan
On Thu, Sep 29, 2016 at 4:40 AM, ivan <ivan.granata.na at gmail.com> wrote:
> i don't understand how i can specify NoiseModelType ('Rician') in my java
> code
>
>
> this is my code
>
>
> import org.itk.simple.*; class PatchBasedDenoisingImageFilter { public
> static void main(String argv[]) { if ( argv.length < 5 ) {
> System.out.println("Immetti prima:
> "); return; } org.itk.simple.ImageFileReader reader = new
> org.itk.simple.ImageFileReader(); reader.setFileName(argv[0]); Image img =
> reader.execute(); org.itk.simple.PatchBasedDenoisingImageFilter filter =
> new
> org.itk.simple.PatchBasedDenoisingImageFilter(); filter.setPatchRadius
> (Long.valueOf( argv[1] ).longValue() ); filter.setNoiseSigma
> (Double.valueOf( argv[2] ).doubleValue() ); filter.setNumberOfIterations
> (Long.valueOf( argv[3] ).longValue() ); Image blurredImg =
> filter.execute(img); CastImageFilter caster = new CastImageFilter();
> caster.setOutputPixelType( img.getPixelIDValue() ); Image castImg =
> caster.execute( blurredImg ); ImageFileWriter writer = new
> ImageFileWriter(); writer.setFileName(argv[4]); writer.execute( castImg );
> }
> }
>
>
>
>
>
> --
> View this message in context: http://itk-users.7.n7.nabble.com/
> PatchBasedDenoisingImageFilter-Funciton-NoiseModel-Java-
> SimpleITK-tp37598.html
> Sent from the ITK - Users mailing list archive at Nabble.com.
> _____________________________________
> 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://www.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://public.kitware.com/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20160929/38149293/attachment.html>
More information about the Insight-users
mailing list