[vtk-developers] problems persist with java, gdcm, and vtk in the git trunk

Mathieu Malaterre mathieu.malaterre at gmail.com
Thu Feb 10 04:01:53 EST 2011


Mark,

  I believe I found your issue:

http://review.source.kitware.com/#change,886

Thanks for reviewing.

On Wed, Feb 9, 2011 at 3:33 AM, Mark Roden <mmroden at gmail.com> wrote:
> Hi all,
>
> I have a problem using gdcm with vtk 5.9 (both found in their
> respective git trunks) when wrapped in java.  This problem does NOT
> happen with vtk 5.6.
>
> If I wrap everything in java, build using java with release or debug
> on both gdcm and vtk, and on mac or on windows using either gcc or
> visual studio 2008, respectively.  The mac is built using unix
> makefiles, not xcode.
>
> I've checked in some sample code in the gdcm repository that should
> show this behavior (at least, it shows it on mine).  It's a mockup of
> the Medical3.java example that's been modified to use the
> vtkGDCMImageReader object instead of the v16 reader.  The file is
> gdcmImageReadingExample.java.  There is quite a bit of code there, but
> the relevant portion is the gdcmReader.Update() line.
>
> The relevant code looks like (where theSize and filenames have been
> defined previously, the entire code is in the example code):
>
> vtkGDCMImageReader reader = new vtkGDCMImageReader();
>
> vtkStringArray sa = new vtkStringArray();
> for (int j = 0; j < theSize; j ++){
>  sa.InsertNextValue(filenames[j]);
> }
>
> gdcmReader.SetFileNames(sa);
> gdcmReader.Update();
>
> vtkImageData theImageData = gdcmReader.GetOutput();
>
> with vtk version 5.6, theImageData is a valid object.  With vtk
> version 5.7 and on, it is not.
>
> What has changed with the java wrapping?  The same code works fine in
> C++, but not when java wrapped.
>
> Please help.  I thought that moving to vtk 5.9 would solve these
> problems, but apparently not.
>
> Thanks,
> Mark
>



-- 
Mathieu



More information about the vtk-developers mailing list