[ImageJ-devel] get current image when implementing a Command interface
Carnë Draug
carandraug+dev at gmail.com
Fri Aug 15 08:32:59 CDT 2014
On 14 August 2014 21:47, Curtis Rueden <ctrueden at wisc.edu> wrote:
> Hi Carnë,
>
> On Thu, Aug 14, 2014 at 12:18 PM, Carnë Draug <carandraug+dev at gmail.com>
> wrote:
>> I open the sample image "blobs" and the plugin will print "8-bit"
>> (expected). Then I open the sample "CT" and it prints "16-bit"
>> (expected). I then select the blobs image, run it again but get
>> "16-bit"
>
> This is a bug in the ImageJ2 legacy layer, responsible for keeping the
> ImageJ2 data structures in sync with ImageJ 1.x. Could you please file an
> issue at https://github.com/imagej/imagej-legacy/issues ?
>
I have just done so [1]. But were all the 3 problems the result of the same bug?
1) it was picking the last opened image instead of last active;
2) it was giving the data type of the image when opened and not the
current data type;
3) running the same plugin on the same image would do no nothing if
the window was still open
Or are these different bugs and I should report them separately?
Also, then how do I use the ImageJ2 libraries to get the current
image? How do I go around to get a RandomAccessible out of an opened
image if I plan to implement an net.imagej.ops.Op that handles ND
images?
Carnë
[1] https://github.com/imagej/imagej-legacy/issues/81
More information about the ImageJ-devel
mailing list