Overview
Forum
Mango
iMango
Papaya
Multi-image Analysis GUI
Board Index
Register
Login
Logout
Settings

Perform a boolean operation between 2 images

Questions or comments about Mango, webMango, iMango or Papaya.

Moderator: Michael Martinez

Perform a boolean operation between 2 images

Postby rj2038 » Wed Apr 10, 2019 11:12 am

Hello,

I am a newbie here. I am trying to use the Image Calculator to perform an "AND" operation between 2 images. What expression should I be using? For example, I tried "this and this" and get 0s (I was expecting 1s).

I think I am missing something simple here. Any help would be appreciated.

Thanks
Raj
rj2038
 
Posts: 1
Joined: Wed Apr 10, 2019 11:05 am

Re: Perform a boolean operation between 2 images

Postby admin » Sun Apr 14, 2019 4:37 pm

If you are wanting to add the two together, then simple

Code: Select all
this + other(1)


(Note the "other" button to access references to images other than the one you are currently in.)

If you were wanting to do something a little more boolean, maybe this, which will produce an output image of 1 or 0:

Code: Select all
if ((this > 1) and (other(1) > 1), 1 else 0)


There are other ways as well.
admin
Site Admin
 
Posts: 77
Joined: Fri Jul 06, 2007 8:18 am
Location: Research Imaging Center


Return to Mango

Who is online

Users browsing this forum: No registered users and 1 guest

cron