[Insight-users] Why are getBufferAs* methods not available in Java?

Bradley Lowekamp blowekamp at mail.nih.gov
Thu Mar 14 10:51:56 EDT 2013


Mathew,

From my understanding what the other user did what just to access the GetPixelAs* method directly in Java ( not through Matlab ), and made it significantly faster. Now I don't know how this would compare to writing it out. If you have a fast solid state or have configured some type of RAM disk, the IO would be faster. Which reminds me that the Slicer3D application created a custom ITK ImageIO which read/writes to a buffer in memory, this would enable you to write some glue Matlab mex to do the conversion. So if you are well verst in that area of ITK, and don't care to learn SWIG, that is another option. Though I think it's less elegant and certainly not as useful to the community as a whole.

In the "Getting Started" wiki page for SimpleITK we have a couple "visual guides" to compiling or to get started with SimpleITK in different environments. I think that a visual guide to getting started in Matlab with SimpleITK and Java would be an excellent addition.

While I have heard people interfacing SimpleITK and Matlab this way, I have not done it myself. Without the expertise to assist users with this I have been hesitant on adding it to the Wiki pages.

SimpleITK needs community support for the various and languages and environments it can be used in. There is an incredibly large amount of work done and still to do to keep the core growing and going. We need developers who use SimpleITK with specific wrapped languages and environments to add that last bit of sugar to make it really sweat, and help with the specific documentation too.

Thanks,
Brad


On Mar 14, 2013, at 10:01 AM, Mathew Guilfoyle <mrguilfoyle at gmail.com> wrote:

>> Other people have told me they have done the conversion in a Java class and
>> it performed much better than in Matlab.
>> 
> 
> Would this not still require a working getBufferAs* method (or
> something similar)?  Is there currently a way in Java to convert an
> Image object to a Java array - if so it would then be easy to bring
> this into the Matlab workspace as a Matlab array.
> 
> I too was surprised there was little information on using SimpleITK in
> Matlab, as apart from the issue already discussed it is very easy to
> run the filters etc even for a relatively inexpert user like myself.
> There is a Matlab-ITK interface I have come across (MATITK) which is a
> C wrapper into ITK itself but it supports only a subset of filters and
> development has now ceased.
> 
> Mathew



More information about the Insight-users mailing list