NIH LISTSERV
NIH LISTSERV
IMAGEJ archives -- May 2002 (#13)

Go to: Previous Message | Next Message
Previous in Topic | Next in Topic
Previous by Same Author | Next by Same Author
Previous Page (May 2002) | Back to Main IMAGEJ Page


Options: Reply | Post a New Message | Join or Leave IMAGEJ, or Change Options | Search
View: Chronologically | Most Recent First | Wrap Text (Proportional Font) | Don't Wrap Text (Non-proportional Font)
*

Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Message-ID:  <[log in to unmask]>
Date:         Fri, 3 May 2002 19:44:48 +1000
Reply-To:     ImageJ Interest Group <[log in to unmask]>
Sender:       ImageJ Interest Group <[log in to unmask]>
From:         Greg Joss <[log in to unmask]>
Subject:      Re: Is there a way to define an anulus?
Comments: To: [log in to unmask]

/*There are a number of approaches that can be taken to this problem. The following is intended to take a flexible macro approach minimising the java necessary and allowing non-java users to follow procedure. Essentially, the use of a binary mask (which lies behind the implementation of any non rectangulsr roi) allows very flexible design of measured area with (multiple) holes. The combination of the "limit to threshold" and "setThreshold(1,255);" limits measurements to densitySliced regions, avoids a minimum of 0 which would otherwise result and gives a correct area.*/ import ij.*; import ij.process.*; import ij.gui.*; import java.awt.*; import ij.plugin.*; import ij.measure.*; // ResultsTable import ij.gui.*; // Plotwindow import ij.plugin.filter.*;// Analyzer public class LimitMeasureMacro_ implements PlugIn { public void run(String arg) { IJ.run("Colors..."); IJ.setForegroundColor(255, 255, 255); IJ.setBackgroundColor(0, 0, 0); IJ.run("Set Measurements...", "area modal min limit decimal=0"); IJ.run("Clear Results"); IJ.run("MRI Stack (528K)"); IJ.run("Duplicate...", "title=binaryMask"); IJ.run("Select All"); IJ.run("Clear"); IJ.setTool(1); IJ.makeOval(50, 125, 84, 76); IJ.run("Fill"); IJ.makeOval(79, 139, 35, 29); IJ.run("Clear"); IJ.run("Select None"); IJ.run("Image Calculator..." , "image1=mri-stack.tif operation=AND image2=binaryMask create stack"); //all the above would probably be tailored manually to suit image // and code commented out except for demonstration purpose. IJ.setThreshold(1,255); int n=WindowManager.getCurrentImage().getStackSize(); for(int i=1;i<=n;i++){ IJ.run("Measure"); IJ.run("Next Slice [>]"); } ResultsTable rt=Analyzer.getResultsTable(); float[]max=rt.getColumn(ResultsTable.MAX); float[]min=rt.getColumn(ResultsTable.MIN); float[]contrast=new float[max.length]; float[]time=new float[max.length]; for(int i=0;i<max.length;i++)time[i]=(float)i; for(int i=0;i<max.length;i++)contrast[i]=max[i]-min[i]; PlotWindow pw =new PlotWindow("Tumor constrast vs time" ,"time","contrast",time,contrast); pw.draw(); } } Greg Joss, Department of Biological Sciences, Phone: (61)(2) 9850 8212 Fax: 9850 8245 Macquarie University, Email: [log in to unmask] North Ryde, (Sydney,) NSW 2109, Australia >>> "Prof. Walter Wolf" <[log in to unmask]> 05/03/02 10:43AM >>> Wayne and others: Is there a way to define an annulus? We are studying the ability of contrast agents to detect changes in the contrast enhancement of tumors (DEMRI or DCE-MRI) and because many solid tumors develop a necrotic core, it there any way to define the ring (annulus) so as to generate a kinetic plot of that ring from a temporal stack of MRI images? Any suggestions would be appreciated. Thank you. -- Professor Walter Wolf, Ph.D. Distinguished Professor of Pharmaceutical Sciences Director, Pharmacokinetic Imaging Program Department of Pharmaceutical Sciences, School of Pharmacy University of Southern California 1985 Zonal Ave., Los Angeles, CA 90089-9121 E-Mail: [log in to unmask] Telephone: 323-442-1405 Fax: 323-442-9804




Back to: Top of message | Previous page | Main IMAGEJ page

NIH LISTSERV Home Page

CIT
Center for Information Technology
National Institutes of Health
Bethesda, Maryland 20892
301 594 6248 (v) 301 496 8294 (TDD)
Comments and Assistance
Accessibility wheelchair icon