[Insight-users] Java+VTK+ITK usage

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Thu Jul 23 16:17:17 EDT 2009


Le 15 juil. 09 à 12:55, Hatice Dogan a écrit :

> Hi everyone,
>

Hi,

> I am new at the using of ITK and VTK. I wrapped ITK and VTK for JAVA  
> and everyting is OK now.  But i read that it is not possible to use  
> vtk/itk together with java.
> Is there a way to connect ITK and VTK with JAVA?

It is possible with wrapitk from google code.

   http://code.google.com/p/wrapitk/

>
> Also I was trying to read a DICOM series using the  
> GDCMSeriesFileNames, but i think  this class doesn't  exist in the  
> Java wrapping.
> Do I have to wrap it myself or is there any way to get access to the  
> class in Java ?
>
> I'm using the following code:
>
> itkGDCMSeriesFileNames nameGenerator =
> itkGDCMSeriesFileNames.itkGDCMSeriesFileNames_New().GetPointer();
>

it is available in wrapitk from google code. Note that the syntax is a  
be a bit different (and I believe, much better):

   itkGDCMSeriesFileNames nameGenerator = new itkGDCMSeriesFileNames();

Regards,

Gaëtan



PS: Note your usage would be wrong with java wrappers, because you  
discard the smart pointer by using GetPointer(). This would destroy  
the object very soon after the execution of this line. The right  
notation would be

   itkGDCMSeriesFileNames_Pointer nameGenerator =  
itkGDCMSeriesFileNames.itkGDCMSeriesFileNames_New();


-- 
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/pipermail/insight-users/attachments/20090723/843d0fee/attachment.pgp>


More information about the Insight-users mailing list