Login  Register

Re: How to know the file name?

Posted by Sullivan, Michael J (College of Med.) on Jul 20, 2005; 2:55pm
URL: http://imagej.273.s1.nabble.com/Apply-Substract-background-to-all-files-in-subfolders-tp3705174p3705184.html

Marco, assuming you have the filename as a String you can use the
addLable(...) command. Below is a couple of lines from my current
project to do this.  If you need a more-in-depth explanation, please let
me know. --- Mike

resultsTable.setHeading(0, "File Name");
resultsTable.addLabel("File Name", imgFileName);
 

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
Marco Brugnara
Sent: Wednesday, July 20, 2005 9:10 AM
To: [hidden email]
Subject: How to know the file name?

Dear all,
I'd like to apologize if my question will sound too basic, just Im
really a newbie in Java.
Within a plugin I would like to add the file name as label in the
results table. For all the other values I use simply the command, for
instance rt.addValue("Scarto:", scrt);

In the result table the column label is already present just it remains
empty, I dont know because I've never assigned this variable, or because
I'm working on a layer created over the original image. How can i manage
in order to obtain the filename in this column?
Thank you very much and best regards,
Marco