ROI Manager, multiple visible and editable selections

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

ROI Manager, multiple visible and editable selections

ArtemisUser
Hi,

I'm writing a plugin for ImageJ with Java and my goal is it to create multiple ROIs on top of an Image and they are supposed to be visible and editable. For that I'm looking for a way to activate the checkboxes "Show All" and "Labels" inside the ROI Manager.

If anyone has any tips or ideas that would be great. cheers
Reply | Threaded
Open this post in threaded view
|

Re: ROI Manager, multiple visible and editable selections

ctrueden
Hi ArtemisUser,

Have you considered using overlays?
http://imagej.net/docs/guide/146-11.html

Regards,
Curtis

On Sat, Dec 5, 2015 at 6:24 AM, ArtemisUser <[hidden email]> wrote:

> Hi,
>
> I'm writing a plugin for ImageJ with Java and my goal is it to create
> multiple ROIs on top of an Image and they are supposed to be visible and
> editable. For that I'm looking for a way to activate the checkboxes "Show
> All" and "Labels" inside the ROI Manager.
>
> If anyone has any tips or ideas that would be great. cheers
>
>
>
> --
> View this message in context:
> http://imagej.1557.x6.nabble.com/ROI-Manager-multiple-visible-and-editable-selections-tp5015139.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: ROI Manager, multiple visible and editable selections

ArtemisUser
Hi Curtis,

I have not much experience working with ImageJ, so you are probably right. I tried to add add Overlay like this:

oLay.add(new Roi(50, 50, 120, 120));
oLay.add(new Roi(200, 150, 120, 120));
imgp.setOverlay(oLayer);
imgp.updateAndDraw();

but then I can't move them arround and change their size (except if I  go to Imgae -> Overlay -> To ROI Manager)

Any advise for that?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: ROI Manager, multiple visible and editable selections

Rasband, Wayne (NIH/NIMH) [E]
> On Dec 5, 2015, at 9:49 AM, ArtemisUser <[hidden email]> wrote:
>
> Hi Curtis,
>
> I have not much experience working with ImageJ, so you are probably right. I
> tried to add add Overlay like this:
>
> oLay.add(new Roi(50, 50, 120, 120));
> oLay.add(new Roi(200, 150, 120, 120));
> imgp.setOverlay(oLayer);
> imgp.updateAndDraw();
>
> but then I can't move them arround and change their size (except if I  go to
> Imgae -> Overlay -> To ROI Manager)
>
> Any advise for that?

You can activate an ROI in an overlay by long pressing on it or by clicking on its label. Here is a JavaScript example.

-wayne

  img = IJ.createImage("Untitled", "8-bit black", 500, 500, 1);
  overlay = new Overlay();
  overlay.add(new Roi(50, 50, 120, 120));
  overlay.add(new Roi(250, 150, 120, 120));
  font = new Font("SansSerif", Font.PLAIN, 24);
  msg = "To activate a selection, long\npress on it or click on its label."
  text = new TextRoi(50, 350, msg, font);
  text.setStrokeColor(Color.white);
  overlay.add(text);
  overlay.drawLabels(true);
  img.setOverlay(overlay);
  img.show();


> --
> View this message in context: http://imagej.1557.x6.nabble.com/ROI-Manager-multiple-visible-and-editable-selections-tp5015139p5015141.html
> Sent from the ImageJ mailing list archive at Nabble.com.

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