[Insight-users] Java wrapper - itkThresholdImageFilter
Vlastimil Slinták
xslint01 at stud.feec.vutbr.cz
Fri Jun 10 09:16:45 EDT 2011
Hello,
I am working with Java wrapper from WrapITK project and I am looking for some examples and/or documentation.
I wrote the easiest example — read image, write image:
itkImageFileReaderIUC2_Pointer reader;
reader = itkImageFileReaderIUC2.itkImageFileReaderIUC2_New();
reader.SetFileName( "test-in.jpg” );
itkImageFileWriterIUC2_Pointer writer;
writer = itkImageFileWriterIUC2.itkImageFileWriterIUC2_New();
writer.SetInput( reader.GetOutput() );
writer.SetFileName( "test-out.jpg” );
writer.Update();
But, what if I want insert some filter between reader and writer? For example, what if user wants read image, apply thresholding and than save result?
itkThresholdImageFilterIUC2_Pointer thresh;
thresh.SetInput( reader );
thresh.SetOutsideValue( 0 );
thresh.ThresholdBelow( 128 );
thresh.Update();
itkThresholdImageFilter in Java has only IUS and IF types. How can I create another types in Java? In native C++ it would be easy.
Thanks,
Vlastimil S.
More information about the Insight-users
mailing list