Recently some significant changes have been merged to the VTK master branch for the Java wrapper code generation. The number of exported data types has been extended to include byte, short, long and float types, so that the generated methods closely match those in the VTK API. Overloaded function declarations are also now output. Array marshalling has been improved and the javac deprecation warnings have been eliminated.
It would be helpful if any developers building the Java wrappers from the master branch could try out the new code and give some feedback about any issues they run into.
I am currently using VTK 9.0.3 with the Java Wrapper that I built few weeks ago. I have VTU files containing <DataArray type="Float64" NumberOfComponents="3" format="binary"> and I have no problem loading them.
However I donât see any method for retrieving vtkDataArray as Java float directly, only as double or double[], so I do the cast by myself. Do you expect I find new Java methods for retrieving byte, short, long and float types?
Thanks Todd. The file I have declare Float64 data type, but data is parsed as java double (seams correct). The method you suggest works but if you are looking for feedback on float loading, may I ask you pointers toward files that lead to java float when loaded?
Yes, I understood vtk Float64 are parsed as java double. My point is that you asked for feedbacks on byte , short , long and float types (which I understood to be java types), but I only have files containing vtk Float64. If you provide me a file containing Float32, I can give a try and let you know if this works correctly.
Ah. Sorry. I donât have any data files for that.
I was mainly referring to methods which now pass parameters of those types like vtkBrush.SetColor(byte r,byte g,byte b) which previously used integers.