[Insight-users] libinsighttoolkit3-java - Ubuntu Package
Jonathan Ruiz Peinado
jonathan.ruiz3 at gmail.com
Thu Mar 8 14:27:33 EST 2012
Hi all , I just started with ITK lib (through java wrapper on Ubuntu 11.10)
and my first try hasn't been very good, I've installed the
ibinsighttoolkit3-java package, some dependencies and the examples package,
so far everything went fine in the installation but when I tried to load
one example (DicomSliceRead.java) I found some missing classes errors.
itkImageFileReaderUS2_Pointer
itkImageFileWriterUC2_Pointer
itkRescaleIntensityImageFilterUS2UC2_Pointer
Well all clases realated to itk really weren't recognized ..
I've tried to run it through netbeans, eclipse and command line , seems
that the jar file (/usr/share/java/InsightToolkit.jar) provided by the
ubuntu package doesn't have this classes, am I right?
How can I run the examples using the official packages?
do someone got the same problem?
I'm currently building the sources of the new itk version 4 to see what
happens, but I think would be better to start messing using the ubuntu's
official package.
The whole example is:
/**
* Example on the use of DicomImageIO for reading a single DICOM slice,
rescale
* the intensities and save it in a different file format.
*
*/
import InsightToolkit.*;
public class DicomSliceRead
{
public static void main( String argv[] )
{
System.out.println("DicomSliceRead Example");
itkImageFileReaderUS2_Pointer reader =
itkImageFileReaderUS2.itkImageFileReaderUS2_New();
itkImageFileWriterUC2_Pointer writer =
itkImageFileWriterUC2.itkImageFileWriterUC2_New();
itkRescaleIntensityImageFilterUS2UC2_Pointer filter =
itkRescaleIntensityImageFilterUS2UC2.itkRescaleIntensityImageFilterUS2UC2_New();
filter.SetInput( reader.GetOutput() );
writer.SetInput( filter.GetOutput() );
itkDicomImageIO_Pointer dicomIO = itkDicomImageIO.itkDicomImageIO_New();
reader.SetImageIO( dicomIO.GetPointer() );
filter.SetOutputMinimum( (short)0 );
filter.SetOutputMaximum( (short) 255);
reader.SetFileName( argv[0] );
writer.SetFileName( argv[1] );
writer.Update();
}
}
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120308/7a7ee2b3/attachment.htm>
More information about the Insight-users
mailing list