Using circular ROIs with XOR

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

Using circular ROIs with XOR

B.W. Basheer
Hello,

I'm new to ImageJ.  Am trying to use xor on the pixel values within the bounds of a circular ROI.  The Javadoc documentation says XOR operates on all pixels in the image or an ROI.  In my tests, the XOR method is operating without regard for the boundaries of the circular ROI.

By way of example, I'm trying it this way:

image.setRoi(new OvalRoi(0,0,2950,2950));
image.getChannelProcessor().xor(0xffff);

Thanks for any suggestions.  It would be greatly appreciated.

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

Re: Using circular ROIs with XOR

Cammer, Michael-2
I'm not sure what youare trying to do, but maybe something like this in the macro language?


  open("http://microscopynotes.com/cd11c_spleen.jpg");
  makeRectangle(0, 0, 282, 108);
  run("Crop");
  run("Split Channels");
  selectWindow("cd11c_spleen.jpg (red)");
  makeOval(76, 9, 88, 88);
  run("Copy");
  selectWindow("cd11c_spleen.jpg (green)");
  setPasteMode("XOR");
  run("Paste");
  run("Select None");
  run("Merge Channels...", "c1=[cd11c_spleen.jpg (red)] c2=[cd11c_spleen.jpg (green)] c3=[cd11c_spleen.jpg (blue)]");



Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory

NYU Langone Health, 540 First Avenue, SK2 Microscopy Suite, New York, NY  10016

[hidden email]<mailto:[hidden email]>  http://nyulmc.org/micros  http://microscopynotes.com/

Voice direct only, no text or messages:  1-914-309-3270 and 1-646-501-0567



________________________________
From: BW Basheer <[hidden email]>
Sent: Monday, March 25, 2019 7:13:31 PM
To: [hidden email]
Subject: Using circular ROIs with XOR

Hello,

I'm new to ImageJ.  Am trying to use xor on the pixel values within the bounds of a circular ROI.  The Javadoc documentation says XOR operates on all pixels in the image or an ROI.  In my tests, the XOR method is operating without regard for the boundaries of the circular ROI.

By way of example, I'm trying it this way:

image.setRoi(new OvalRoi(0,0,2950,2950));
image.getChannelProcessor().xor(0xffff);

Thanks for any suggestions.  It would be greatly appreciated.

--
ImageJ mailing list: https://urldefense.proofpoint.com/v2/url?u=http-3A__imagej.nih.gov_ij_list.html&d=DwIFaQ&c=j5oPpO0eBH1iio48DtsedeElZfc04rx3ExJHeIIZuCs&r=hUBj2D5n6oKThx2L01qn8IORZb5f-ruLVXPmQ1zQNnM&m=uPasgld5lO2gYOzu-TzgJCYBgCovhTnNzMYF5Z3PG_I&s=oyyXpH9tEHhBREpoFGSro5MhWwJHnYxc7Nso_T-e94I&e=

------------------------------------------------------------
This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
=================================

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

Re: Using circular ROIs with XOR

dksamuel
Dr.Crammer. wow and thanks. Samuel Bangalore India

On Tue, Mar 26, 2019, 8:33 AM Cammer, Michael <[hidden email]>
wrote:

> I'm not sure what youare trying to do, but maybe something like this in
> the macro language?
>
>
>   open("http://microscopynotes.com/cd11c_spleen.jpg");
>   makeRectangle(0, 0, 282, 108);
>   run("Crop");
>   run("Split Channels");
>   selectWindow("cd11c_spleen.jpg (red)");
>   makeOval(76, 9, 88, 88);
>   run("Copy");
>   selectWindow("cd11c_spleen.jpg (green)");
>   setPasteMode("XOR");
>   run("Paste");
>   run("Select None");
>   run("Merge Channels...", "c1=[cd11c_spleen.jpg (red)]
> c2=[cd11c_spleen.jpg (green)] c3=[cd11c_spleen.jpg (blue)]");
>
>
>
> Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory
>
> NYU Langone Health, 540 First Avenue, SK2 Microscopy Suite, New York, NY
> 10016
>
> [hidden email]<mailto:[hidden email]>
> http://nyulmc.org/micros  http://microscopynotes.com/
>
> Voice direct only, no text or messages:  1-914-309-3270 and 1-646-501-0567
>
>
>
> ________________________________
> From: BW Basheer <[hidden email]>
> Sent: Monday, March 25, 2019 7:13:31 PM
> To: [hidden email]
> Subject: Using circular ROIs with XOR
>
> Hello,
>
> I'm new to ImageJ.  Am trying to use xor on the pixel values within the
> bounds of a circular ROI.  The Javadoc documentation says XOR operates on
> all pixels in the image or an ROI.  In my tests, the XOR method is
> operating without regard for the boundaries of the circular ROI.
>
> By way of example, I'm trying it this way:
>
> image.setRoi(new OvalRoi(0,0,2950,2950));
> image.getChannelProcessor().xor(0xffff);
>
> Thanks for any suggestions.  It would be greatly appreciated.
>
> --
> ImageJ mailing list:
> https://urldefense.proofpoint.com/v2/url?u=http-3A__imagej.nih.gov_ij_list.html&d=DwIFaQ&c=j5oPpO0eBH1iio48DtsedeElZfc04rx3ExJHeIIZuCs&r=hUBj2D5n6oKThx2L01qn8IORZb5f-ruLVXPmQ1zQNnM&m=uPasgld5lO2gYOzu-TzgJCYBgCovhTnNzMYF5Z3PG_I&s=oyyXpH9tEHhBREpoFGSro5MhWwJHnYxc7Nso_T-e94I&e=
>
> ------------------------------------------------------------
> This email message, including any attachments, is for the sole use of the
> intended recipient(s) and may contain information that is proprietary,
> confidential, and exempt from disclosure under applicable law. Any
> unauthorized review, use, disclosure, or distribution is prohibited. If you
> have received this email in error please notify the sender by return email
> and delete the original message. Please note, the recipient should check
> this email and any attachments for the presence of viruses. The
> organization accepts no liability for any damage caused by any virus
> transmitted by this email.
> =================================
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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