Login  Register

Re: open ROI.zip

Posted by Peter Haub on Aug 03, 2020; 10:09am
URL: http://imagej.273.s1.nabble.com/open-ROI-zip-tp5023799p5023803.html

".. it does not work .."
What happens?

replace(path, "ROI.zip", "d1.C01");
=> There is no variable with the name 'path' in your posted macro!

( I assume you want to open an image after opening the Rois. Therefore
you exchange the "ROI.zip" and "d1.C01".
Is your image file ending with "d1.C01". Is there no extension (e.g.
.tif)? )


On 03.08.2020 11:51, OBEID Patricia 154904 wrote:

> Thanks Peter,
> The problem is, I have a long list of images and ROIs. I want to open the image and the corresponding ROIManager and therefore make a loop for my treatments but it does not work.
> I started my macro like this:
>
> dir = getDirectory("Choose a Directory ");
> dir3 = getDirectory("Choose Destination Directory ");
>
> list = getFileList(dir);
> setBatchMode(true);
> for (i=0; i<list.length; i++) {
> if (endsWith(list[i], "ROI.zip")){ //A ADAPTER AU NOM DU CHANNEL
> roiManager("open", dir+list[i]);
>
> //ouvrir image des noyaux
> pathNuc = replace(path, "ROI.zip", "d1.C01");
> fileNuc = replace(list[i], "ROI.zip", "d1.C01");
> open(pathNuc);
>
> Can you help me find out what is wrong?
> Thank you
>
>
>
>
> -----Message d'origine-----
> De : ImageJ Interest Group <[hidden email]> De la part de Peter Haub
> Envoyé : lundi 3 août 2020 11:20
> À : [hidden email]
> Objet : Re: open ROI.zip
>
> Hi
>
> you can use the Plugins>Macros>Record... function to record the command you are currently using manually.
> This gives at least important hints.
>
> Here is the result for your question:
>
> // (optinal) reset RoiManager
> roiManager("reset");
>
> // Select a roi.zip file vai File Open dialog run("Open...");
>
> // .. alternatively use a path string pointing to the zip file
>
> //roiManager("reset");
> //roiManager("Open", "C:\\PATH_TO_\\RoiSet.zip");
>
> Peter
>
> On 03.08.2020 11:01, OBEID Patricia 154904 wrote:
>> Hello,
>> I would like using a macro to open the ROI.zip (generated previously in a 1st macro) and apply them to images.
>> I write 2 macros to simplify my script writing.
>> But I don't know how to write the command line to open ROI.zip.
>> Could you help me please ?
>> I thank you in advance.
>> Patricia
>> ____________________________________________________________
>> [http://www.cea.fr/var/cea/signatures/cea_logo.jpg]<http://www.cea.fr/
>>> [logo_mail]
>> Patricia OBEÏD
>> Ingénieur de Recherche /Animateur Informatique Biomics Institut de
>> Recherche Interdisciplinaire de Grenoble CEA/DRF / IRIG / DS /BGE
>> U1038/ Biomics / Bât 4020
>> 17 rue des martyrs 38054 Grenoble Cedex 9 Commissariat à l'énergie
>> atomique et aux énergies alternatives Email :
>> [hidden email]<mailto:[hidden email]>
>> Tél : (+33)4 38 78 47 12         Fax : (+33)4 38 78 59 17
>>
>> Toute notre actualité sur www.cea.fr et sur
>> http://www.cea.fr/drf/big/bge/biomics<http://www.cea.fr/>
>>
>> <http://www.cea.fr/>Suivez-nous également sur Twitter :
>> @CEA_Recherche<https://twitter.com/#!/CEA_Recherche> et sur
>> https://twitter.com/BiomicsLab
>>
>>
>>
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html