[vtkusers] [Bioimagexd-devel] Bio-Formats integration with VTK/ITK

Lassi Paavolainen lopaavol at jyu.fi
Fri Jan 9 10:00:03 EST 2009


Dear Curtis and Dan,

I'm a programmer in the BioImageXD project and I'm glad to know that you 
Curtis are working on using Bio-Formats from VTK/ITK. It will definitely 
be needed. We've been planning to use Bio-Formats for a year or so but 
never got enough time to really dig into it to do some practical work.

Here are some comments on Dan's previous mail:

On Fri, 9 Jan 2009, Dan White wrote:

> Begin forwarded message:
> >
> > * Support for these formats in BioImageXD (http:// 
> > www.bioimagexd.net/),
> > which I understand also uses ITK to read images.
> >
> 
> Kalle and Lassi can correct me here, but I think we use VTK primarily,
> then send data through the pipeline to ITK functions as required.
> But the point is that it would be very cool if both ITK and VTK
> could use bio-formats to read microscopy etc data.

We use VTK, original and our own classes, to read data. Only BioRad reader 
uses ITK which is then translated to VTK ImageData.

As Dan said, it would be very nice if both ITK and VTK could use 
Bio-Formats, but for our visualizations VTK support would be even more 
needed. This comes from the fact that visualizations done using VTK need 
to be really fast but ITK functionality (like segmentation) can be more 
time consuming. So straight VTK support would eliminate the need for 
converting ITK Image to VTK ImageData and in that way also be faster.

We need to look into streaming possibilities too. If I remember correctly, 
streaming doesn't work over ITK-VTK bridge which is not so good thing when 
using Bio-Formats in ITK with huge files and then visualizing those in 
VTK. But Bio-Formats support in ITK would still be a great advance and we 
would gladly use it.

> > ---
> > PERFORMANCE
> >
> > I have done a lot of research on time and space performance of Java  
> > versus
> > C++, as well as performance when integrating Java code with C++  
> > through
> > various means. Much of those results fall outside the scope of this  
> > email,
> > but suffice to say that Java's I/O performance is comparable to C++,  
> > and
> > Bio-Formats is mostly I/O-bound. Any observed speed difference in the
> > Bio-Formats library compared to other implementations (e.g., Dan  
> > points out
> > that BioImageXD's LSM support is faster than reading an LSM file  
> > into ImageJ
> > using Bio-Formats) is most likely due to algorithm inefficiency in the
> > Bio-Formats code rather than a relative deficiency in the language  
> > itself.
> 
> The java folks around here (MPI-CBG) tell me that there are very few  
> significant speed difference between the java VM and
> native C++ code running the same kind of operations, so I suspect you  
> are right on here.
> So the point is to also work on bio-formats itself to improve  
> performance,
> and learn from other implementations for reading certain file types  
> that seem fast.
> >
> >
> > Regardless, I think our best bet is to interface the Bio-Formats  
> > Java API
> > with C++ in the most performant way available. Any solution more  
> > involved
> > than that, such as language translating Bio-Formats into C++, has  
> > its own
> > serious pitfalls, would require months of effort at best, and would be
> > prohibitive for us to maintain. And less sophisticated solutions,  
> > such as
> > conversion of life sciences formats into the open OME-TIFF standard,  
> > then
> > reading the result into ITK, are not performant enough for many
> > applications.
> 
> 
> .... bearing in mind that many folks use VTK / ITK via wrappings for  
> other languages.
> Many use Java... so could use bio-formats easily on its own.
> Others, like BioImageXD use python, or tcl...
> so somehow the use of bio-formats would still need to work from
> eg python wrapped VTK / ITK.
> I dont understand the practical details of that, or even if it would  
> be an issue at all...
> again , please excuse my ignorance.

This shouldn't be an issue. If VTK/ITK C++ class for using Bio-Formats can 
be made then it can be wrapped for other languages like Python too. There 
are probably some special cases when this cannot be done but I don't know 
any. Probably VTK/ITK people can tell more about those.

> > ---
> > QUESTIONS AND DISCUSSION
> >
> > My goal with this email is to kickstart some discussion about  
> > integrating
> > Bio-Formats with VTK/ITK. Specifically, my questions for the  
> > community are:
> >
> > 1) Do others agree that this form of integration is a good idea? Or  
> > is there
> > a better way to accomplish the bulleted goals above?
> 
> yes, yes and thrice YES, it is a good idea.
> I see no better way to accomplish the above.

I have to agree with you guys too.

> > 2) I don't know much about ITK or VTK yet. Where is the right  
> > integration
> > point? Within ITK, accessible using ImageIOBase/ImageIOFactory? Or
> > elsewhere? Does VTK/ITK have an appropriate plugin infrastructure?
> 
> External kits (see the bxdVTK kit in the BioImageXD source code) ???

Actually that is vtkBXD :) There is also itkBXD. Both are external 
projects.

> > This project is currently my top priority, but I am not a C++ expert  
> > and I
> > would greatly appreciate help from anyone in these various  
> > communities.
> > Thanks in advance for any comments and replies!
> >
> 
> If I can help in any way I am able then I will!

I am also interested on your work Curtis and I will help on those part 
that I can. I can also test ideas you come up with as much as I have spare 
time.

Regards,
Lassi Paavolainen

-- 
Lassi Paavolainen, M.Sc.
Software Engineer
BioImageXD (http://www.bioimagexd.net)
lopaavol at jyu.fi



More information about the vtkusers mailing list