Documentation about SciJava converters and SciJava ConvertService

Posted by joheras on
URL: http://imagej.273.s1.nabble.com/Documentation-about-SciJava-converters-and-SciJava-ConvertService-tp5018340.html

Hi,

we recently released a new version of IJ-OpenCV (
https://github.com/joheras/IJ-OpenCV): a library with the aim of connecting
ImageJ and OpenCV. In that development, we built our converters on top of
SciJava converters, and used them to implement several ImageJ plugins.

Currently, and following the advice of Curtis Rueden (
https://github.com/joheras/IJ-OpenCV/issues/5), we are trying to
reimplement our plugins using SciJava commands to gain the advantages of
SciJava parametrized modules. To achieve this aim, I think that I need to
refactor my development.

I have found two projects where they are using SciJava converters and the
SciJava ConvertService to connect ImageJ with other systems:

   - ImageJ-Matlab (https://github.com/imagej/imagej-matlab) connecting
   ImageJ and Matlab, and
   - ImageJ-ITK (https://github.com/imagej/imagej-itk) connecting ImageJ
   and ITK.

However, I am not sure about the procedure that has been followed when
developing those libraries. Up to now what I have understood is that the
following steps are necessary:

1) Define an interface that extends the ImageJService with two methods:

   - Mat getMat(Dataset dataset):  to convert a Dataset to an OpenCV image.
   - Dataset getDataset(Mat mat): to conver an OpenCV image to a Dataset.

2) Implement the above interface with a class defined as a Service plugin.

3) Define the converter plugins using the above class.

Then, everything should be ready to take advantage of SciJava parametrized
modules, am I going in the right direction?

Could you indicate me any documentation that I could follow to implement
this functionality?

Thanks in advance.

Jónathan

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html