Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Dear all,
I'm working on this macro to correct the images that I got them from a fluorescence microscope, and I need some help please: ******************* dirX = getDirectory("Choose the dark reference folder"); listX = getFileList(dirX + "/"); X=listX[0]; open(dirX + X); dirY = getDirectory("Choose H2AX image folder "); listY = getFileList(dirY+"/"); Y = listY[0]; open(dirY + Y); run("Calculator Plus", "i1=X i2=Y operation=[Subtract: i2 = (i1-i2) x k1 + k2] k1=1 k2=0 create"); ******************* The plugin didn't accept i1=X and i2=Y as inputs in this form "i1=X i2=Y ... (I think the reason is the quotations when I read the X and Y but I'm not sure) and I didn't arrive to correct it..? Anyone could help me? Thank you |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
i ran your code on my macintosh and it performed perfectly after I took out the return changing ...
[Subtract: i2 = (i1-i2) x k1 + k2] k1=1 k2=0 create"); to [Subtract: i2 = (i1-i2) x k1 + k2] k1=1 k2=0 create"); -- Paul C. Grimm Professor of Pediatrics Dept of Pediatric Nephrology Lucile Packard Children's Hospital Stanford University School of Medicine G306, MC 5208 300 Pasteur Drive Stanford, CA 94305-5208 USA phone 650-723-7903 fax 650-498-6714 "The gem cannot be polished without friction, nor man perfected without trials” -Chinese Proverb On Apr 17, 2010, at 1:22 PM, NatashaW wrote: > Dear all, > I'm working on this macro to correct the images that I got them from a > fluorescence microscope, and I need some help please: > > ******************* > dirX = getDirectory("Choose the dark reference folder"); > listX = getFileList(dirX + "/"); > X=listX[0]; > open(dirX + X); > > dirY = getDirectory("Choose H2AX image folder "); > listY = getFileList(dirY+"/"); > Y = listY[0]; > open(dirY + Y); > > run("Calculator Plus", "i1=X i2=Y operation=[Subtract: i2 = (i1-i2) x k1 + > k2] k1=1 k2=0 create"); > ******************* > The plugin didn't accept i1=X and i2=Y as inputs in this form "i1=X i2=Y ... > (I think the reason is the quotations when I read the X and Y but I'm not > sure) and I didn't arrive to correct it..? > > Anyone could help me? > Thank you > -- > View this message in context: http://n2.nabble.com/Question-about-the-plugin-Calculator-Plus-tp4918748p4918748.html > Sent from the ImageJ mailing list archive at Nabble.com. ... [show rest of quote]
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
The problem in the code posted is that the variable names should be outside
the quotations: Instead of: > > run("Calculator Plus", "i1=X i2=Y operation=[Subtract: i2 = (i1-i2) x k1 > > + k2] k1=1 k2=0 create"); it should be something like: run("Calculator Plus", "i1="+X+" i2="+Y+" operation=[Subtract: i2 = (i1-i2) x k1 + k2] k1=1 k2=0 create"); or add an ampersand prefix to get the variables' values in the quoted string: run("Calculator Plus", "i1=&X i2=&Y operation=[Subtract: i2 = (i1-i2) x k1 + k2] k1=1 k2=0 create"); all in one line, obviously. Cheers, G. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
In reply to this post by Paul Grimm-2
Hello,
Indeed, what I want to do is to control the values of i1 and i2 as I want I need that in the rest of my code, so how can I tell him to subtract an image "X" from another image "Y" or whatever image? I think the plugin Calculator Plus takes the values of i1 and i2 from a predefined list (which is the IDList) Maybe I should work with stacks or change something in the plugin code ?? I'm waiting your suggestions.. Thanks |
Free forum by Nabble | Disable Popup Ads | Edit this page |