[vtk-developers] problems persist with java, gdcm, and vtk in the git trunk
Mark Roden
mmroden at gmail.com
Fri Feb 11 13:58:53 EST 2011
Working now with 886!
whooo!
I was getting distracted by a crash from this code:
vtkFileOutputWindow outWin = new vtkFileOutputWindow();
//outWin.SetInstance(outWin);//vtk 5.9 does not want this to be here
outWin.SetFileName("MVSVTKViewer.log");
but commenting out the second line appears to make it all work. Now
there are a bunch of things that have changed that require fixing...
Thanks!
Mark
On Thu, Feb 10, 2011 at 3:53 PM, Mark Roden <mmroden at gmail.com> wrote:
> Hi all,
>
> Thanks for your work on this, Mathieu. Unfortunately, the fix doesn't
> work; it actually breaks vtk's handling of strings elsewhere, before
> my code even gets to the vtkGDCM code. Everything will compile, but
> it won't run.
>
> I've reflected this in the gerrit patch. Let me know what else I can
> do; I'll definitely keep an eye open for other patches, or can skype
> for fixing issues in a pair.
>
> Mark
>
> On Thu, Feb 10, 2011 at 5:13 AM, David Partyka
> <david.partyka at kitware.com> wrote:
>> When this gets committed let me know and I will put it on the release branch
>> as well.
>>
>> On Thu, Feb 10, 2011 at 4:01 AM, Mathieu Malaterre
>> <mathieu.malaterre at gmail.com> wrote:
>>>
>>> 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
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>>
>>
>>
>
More information about the vtk-developers
mailing list