Open PetrBainar opened 6 years ago
@PetrBainar Did you have time to track this down? If not, I am happy to investigate it. Can you post a quick set of steps here to reproduce the issue?
@ctrueden
For example, the net.imagej.plugins.commands.rotate.FlipHorizontally
Command requires an ImageDisplay object as an input, however the images are stored on the server as Dataset objects.
We did some investigation on this issue and it can easily be resolved by adding appropriate converters (e.g. from Dataset to ImageDisplay) to the project. However, the outputs resulting from the Command execution are not converted back so you might end up with multiple independent objects (e.g. Dataset and numerous DatasetView objects) corresponding to a single image.
We tried to store images as DatasetView objects immediately after upload and had better experience with this approach. Nevertheless, there might be some constrains we are not aware. What was the rationale for choosing Dataset as the type for storing images?
I had the same probelm, but I don't know where to add the converters, do you have any suggestions?
I had the same probelm, but I don't know where to add the converters, do you have any suggestions?
A Converter
should be discoverable by SciJava's ConvertService
as long as it is decorated as the org.scijava.convert.Converter
plugin. See a custom Converter
added within this project here.
Thanks for your advice, it works!
Converting between various image classes like Dataset, ImageDisplay or DatasetView during module execution is not working properly. For example, when a Dataset object is provided, it is expected to be converted into an ImageDisplay or a DatasetView instance when needed.
However, this is not happening at the moment as ConvertService.convert(...) returns null.