[Insight-developers] ITK wrapping status
Gaëtan Lehmann
gaetan.lehmann at jouy.inra.fr
Fri Oct 22 05:59:29 EDT 2010
Le 22 oct. 10 à 09:08, Michal Suchanek a écrit :
> Hello
>
> 2010/10/21 Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>:
>
>>
>>
>> I've just commited a fix in ITK.
>> I don't know why I haven't seen that bug yesterday...
>>
>
> Thanks for fixing that.
>
> I have now installable wrappings.
great!
>
> I tried porting the WaterSchedSegmentation1 example to the new
> wrappings but is seems they are lacking itkImageFileWriterIUL2 which
> makes this example unportable to them.
Well, not exactly unportable. You just have to convert the output of
the watershed to a more usable type (not tested):
import org.itk.io.*;
import org.itk.denoising.*;
import org.itk.filtering.*;
import org.itk.segmentationandthreshold.*;
public class WatershedSegmentation1
{
public static void main( String argv[] )
{
System.out.println("WatershedSegmentation1 Example");
itkImageFileReaderIF2 reader = new itkImageFileReaderIF2();
reader.SetFileName( argv[0] );
itkGradientAnisotropicDiffusionImageFilterIF2IF2 diffusion =
new itkGradientAnisotropicDiffusionImageFilterIF2IF2();
diffusion.SetInput( reader.GetOutput() );
diffusion.SetTimeStep( 0.0625 );
diffusion.SetConductanceParameter( 9.0 );
diffusion.SetNumberOfIterations( 5 );
itkGradientMagnitudeImageFilterIF2IF2 gradient =
new itkGradientMagnitudeImageFilterIF2IF2();
gradient.SetInput(diffusion.GetOutput());
itkWatershedImageFilterIF2 watershed =
new itkWatershedImageFilterIF2();
watershed.SetInput( gradient.GetOutput() );
watershed.SetThreshold( 0.01 );
watershed.SetLevel( 0.2 );
itkRelabelComponentImageFilterIUL2IUC2 relabel =
new itkRelabelComponentImageFilterIUL2IUC2();
relabel.SetInput( watershed.GetOutput() );
itkImageFileWriterIUL2 writer = new itkImageFileWriterIUL2();
writer.SetFileName( argv[1] );
writer.SetInput( relabel.GetOutput() );
writer.Update();
}
}
>
> However I noticed RGB image IO wrappings which I use in my examples
> which did not work in the ITK 3 wrappings without adding instances for
> RGB.
Can you be more specific on what is missing?
Gaëtan
--
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66 fax: 01 34 65 29 09
http://voxel.jouy.inra.fr http://www.itk.org
http://www.mandriva.org http://www.bepo.fr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20101022/ab4f7ee4/attachment.pgp>
More information about the Insight-developers
mailing list