Saving Results to Volumes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Saving Results to Volumes

Tomm
Hi all,

I have two questions.
1) Is is possible to select an external HDD as a directory in macro?  (The following code did not work in my
Mac.)
2) How do I put the name(ID) from roiManager (ex. 0013-0372) as a file name? (The following code put the index.)
--
dir = getDirectory("Volumes") + "ExternalHDD/" + "FolderA/";
name = roiManager("index") ;
saveAs("results", dir+name+".xls");
--
Finally I wanna save the file (0013-0372.xls) in /Volumes/ExternalHD/FolderA/.

Thanks for any help.
Tom
Reply | Threaded
Open this post in threaded view
|

Re: Saving Results to Volumes

Rasband, Wayne (NIH/NIMH) [E]
On Mar 4, 2014, at 4:06 AM, Tom Kon wrote:

> Hi all,
>
> I have two questions.
> 1) Is is possible to select an external HDD as a directory in macro?  (The
> following code did not work in my
> Mac.)
> 2) How do I put the name(ID) from roiManager (ex. 0013-0372) as a file name?
> (The following code put the index.)
> --
> dir = getDirectory("Volumes") + "ExternalHDD/" + "FolderA/";
> name = roiManager("index") ;
> saveAs("results", dir+name+".xls");
> --
> Finally I wanna save the file (0013-0372.xls) in
> /Volumes/ExternalHD/FolderA/.

The equivalent of this code works for me:

  name = Roi.getName;
  saveAs("Results", "/Volumes/ExternalHDD/FolderA/"+name+".xls");

It requires ImageJ 1.48h or later. I found the file path by recording the File>Save As>Results command.

-wayne


> View this message in context: http://imagej.1557.x6.nabble.com/Saving-Results-to-Volumes-tp5006764.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Saving Results to Volumes

Tomm
Hi Wayne,
Thanks very much for your help!! I succeeded.