[vtkusers] C++ to Java mapping guide?

Gerrick Bivins Gerrick.Bivins at halliburton.com
Tue Jul 2 07:42:02 EDT 2013


Hi Graham,
Did you take a look at this example:
http://vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/Statistics/ExampleKMeansStatistics.cxx

At first glance, it seems more complete than the one on the wiki. I haven't used that filter but
it's at least another reference for you.

I've done quite a bit with VTK in native and wrapped languages and found that most of it is 1-to-1.
The limitations I've found are usually due to wrapping restrictions based on incompatibility in the languages.
And even in those cases, there is usually a way around it (I'm looking at you vtkAlgorithm::SetInputArrayToProcess :) )

Lots of people are using VTK in Java and other wrapped languages as well so if you have questions just post to the list and
someone will be glad to point you in the right direction.
Gerrick
From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Graham Seed
Sent: Tuesday, July 02, 2013 3:27 AM
To: vtkusers at vtk.org
Subject: [vtkusers] C++ to Java mapping guide?

Hi

Working through the KMeansClustering C++ example, it is difficult to convert the code from C++ to Java.

Another problem I found is the line:


vtkVariant v = kMeansStatistics->GetOutput()->GetValue(r,kMeansStatistics->GetOutput()->GetNumberOfColumns() - 1);





In Java the GetOutput() method returns an object of type vtkTable, which does not support the GetValue() method?



It does support the GetRow() method which returns an object of type vtkVariantArray but can't see an easy way to get values out of the variant array.



I must say that trying to get these simple examples is proving very difficult, and can only imagine how difficult it must be for real life examples.



Thanks.

--
Graham
gmseed at gmail.com<mailto:gmseed at gmail.com>

----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient.  Any review, use, distribution, or disclosure by others is strictly prohibited.  If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130702/a4c4b731/attachment.htm>


More information about the vtkusers mailing list