Dear ImageJ colleagues,
If I have four images A (x,y), B(x,y), C(x,y), and D(x,y). I would like to generate another image, and its pixel value is the standard deviation of the four images. For example at location (1,1), its intensity at four images are 50, 50, 50, 50. Then I want to generate a new image at location (1,1) its intensity is 0 (Since Standard deviation=0 ) How could I do that? Should I use Macro language, or javascript, or java? Any suggest is appreciated as well as the codes. Thanks! Zhengyu Zhengyu Pang, Ph.D. Biochemistry and Bioanalytics Laboratory Life Sciences and Medical Diagnostics Technology Organization Diagnostics and Biomedical Technologies GE Global Research, K1-5B37A One Research Circle Niskayuna, NY 12309 T: 518-387-4015 F: 518-387-7765 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
On Wednesday 31 Jul 2013 22:38:04 Pang, Zhengyu wrote:
> If I have four images A (x,y), B(x,y), C(x,y), and D(x,y). I would like to > generate another image, and its pixel value is the standard deviation of > the four images. For example at location (1,1), its intensity at four > images are 50, 50, 50, 50. Then I want to generate a new image at > location (1,1) its intensity is 0 (Since Standard deviation=0 ) > > How could I do that? Should I use Macro language, or javascript, or java? If I understand correct, just make a stack with your images and then do a z- projection chosing "standard deviation" as type. Hope it helps Gabriel -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Gabriel,
This is definitely one solution, and it is the solution of using Macro language. If I really want to do it using Java or Javascript, how should I write the code? Thanks! Zhengyu -----Original Message----- From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Gabriel Landini Sent: Wednesday, July 31, 2013 5:45 PM To: [hidden email] Subject: Re: Generating an image which is the standard deviation of four images. On Wednesday 31 Jul 2013 22:38:04 Pang, Zhengyu wrote: > If I have four images A (x,y), B(x,y), C(x,y), and D(x,y). I would > like to generate another image, and its pixel value is the standard > deviation of the four images. For example at location (1,1), its > intensity at four images are 50, 50, 50, 50. Then I want to generate > a new image at location (1,1) its intensity is 0 (Since Standard > deviation=0 ) > > How could I do that? Should I use Macro language, or javascript, or java? If I understand correct, just make a stack with your images and then do a z- projection chosing "standard deviation" as type. Hope it helps Gabriel -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
On Wednesday 31 Jul 2013 23:04:00 Pang, Zhengyu wrote:
> This is definitely one solution, and it is the solution of using Macro > language. > > If I really want to do it using Java or Javascript, how should I write the > code? You could use the macro recorder and specify recording javascript or a plugin to produce something like: imp = IJ.openImage("http://imagej.nih.gov/ij/images/mri-stack.zip"); IJ.run(imp, "Z Project...", "start=1 stop=27 projection=[Standard Deviation]"); imp.show(); for javascript or for a plugin: import ij.*; import ij.process.*; import ij.gui.*; import java.awt.*; import ij.plugin.*; import ij.plugin.frame.*; public class My_Plugin implements PlugIn { public void run(String arg) { ImagePlus imp = IJ.openImage("http://imagej.nih.gov/ij/images/mri-stack.zip"); IJ.run(imp, "Z Project...", "start=1 stop=27 projection=[Standard Deviation]"); imp.show(); } } But if you want to code it directly, you will need to look at the source code and see how it is done. Cheers Gabriel -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |