Quantcast

Help Merge images

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Help Merge images

OBEID Patricia 154904
Hello everyone
I have a problem with a script that worked. Today, I can not make a superimposition of images and I do not understand where the problem is ...
Any help will be welcome. (I don't know how attach images to my message. The previous mail with images was rejected ...)
Thank you
Patricia

The script is :
   dir = getDirectory("Choose a Directory ");
   dir2 = getDirectory("Choose Destination Directory ");

      list = getFileList(dir);
      setBatchMode(true);
      for (i=0; i<list.length; i++) {
                if (endsWith(list[i], "d1.C01")){

                //Ouvre le fichier CTOr
                        path = dir+list[i];
                        //run("Bio-Formats Windowless Importer","open=[path] open_files");
                        open(path);
                        setMinAndMax(800, 20000);
                                               
                //Ouvre le CE
                        pathF = replace(path, "d1.C01", "d0.C01");
                        fileF = replace(list[i], "d1.C01", "d0.C01");
                        open(pathF);
                        setMinAndMax(1000, 1800);
               
                        channels = "green = ["+list[i]+"] red = ["+fileF+"] ";
                        run("Merge Channels...", channels);
                       
                        pathRGB = dir2 + replace(list[i], "d1.C01", "RGB.TIF");
                        saveAs("Tiff", pathRGB);
                        }
      }

print("C'est fini");

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

Re: Help Merge images

Eric Denarier
Hi Patricia,

It seems you are missing a [i] in line 20 :

channels = "green = ["+list[i]+"] red = ["+fileF+"] ";

shoud be : channels = "green = ["+list[i]+"] red = ["+fileF[i]+"] ";


Eric Denarier
Grenoble Institut des Neurosciences
Inserm U1216
Chemin Fortuné Ferrini
38700 La Tronche
France

Tél :33 (0)4 565 205 38

http://neurosciences.ujf-grenoble.fr/

Le 12/04/2017 à 15:22, Patricia OBEID a écrit :

> Hello everyone
> I have a problem with a script that worked. Today, I can not make a superimposition of images and I do not understand where the problem is ...
> Any help will be welcome. (I don't know how attach images to my message. The previous mail with images was rejected ...)
> Thank you
> Patricia
>
> The script is :
>     dir = getDirectory("Choose a Directory ");
>     dir2 = getDirectory("Choose Destination Directory ");
>
>        list = getFileList(dir);
>        setBatchMode(true);
>        for (i=0; i<list.length; i++) {
> if (endsWith(list[i], "d1.C01")){
>
> //Ouvre le fichier CTOr
> path = dir+list[i];
> //run("Bio-Formats Windowless Importer","open=[path] open_files");
> open(path);
> setMinAndMax(800, 20000);
>
> //Ouvre le CE
> pathF = replace(path, "d1.C01", "d0.C01");
> fileF = replace(list[i], "d1.C01", "d0.C01");
> open(pathF);
> setMinAndMax(1000, 1800);
>
> channels = "green = ["+list[i]+"] red = ["+fileF+"] ";
> run("Merge Channels...", channels);
>
> pathRGB = dir2 + replace(list[i], "d1.C01", "RGB.TIF");
> saveAs("Tiff", pathRGB);
> }
>        }
>
> print("C'est fini");
>
> --
> 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
|  
Report Content as Inappropriate

Re: Help Merge images

Eric Denarier
In reply to this post by OBEID Patricia 154904
Ah ben désolé.

En tout ca le [i] manque.

Je vais essayé ta macro


Eric Denarier
Grenoble Institut des Neurosciences
Inserm U1216
Chemin Fortuné Ferrini
38700 La Tronche
France

Tél :33 (0)4 565 205 38

http://neurosciences.ujf-grenoble.fr/

Le 12/04/2017 à 15:22, Patricia OBEID a écrit :

> Hello everyone
> I have a problem with a script that worked. Today, I can not make a superimposition of images and I do not understand where the problem is ...
> Any help will be welcome. (I don't know how attach images to my message. The previous mail with images was rejected ...)
> Thank you
> Patricia
>
> The script is :
>     dir = getDirectory("Choose a Directory ");
>     dir2 = getDirectory("Choose Destination Directory ");
>
>        list = getFileList(dir);
>        setBatchMode(true);
>        for (i=0; i<list.length; i++) {
> if (endsWith(list[i], "d1.C01")){
>
> //Ouvre le fichier CTOr
> path = dir+list[i];
> //run("Bio-Formats Windowless Importer","open=[path] open_files");
> open(path);
> setMinAndMax(800, 20000);
>
> //Ouvre le CE
> pathF = replace(path, "d1.C01", "d0.C01");
> fileF = replace(list[i], "d1.C01", "d0.C01");
> open(pathF);
> setMinAndMax(1000, 1800);
>
> channels = "green = ["+list[i]+"] red = ["+fileF+"] ";
> run("Merge Channels...", channels);
>
> pathRGB = dir2 + replace(list[i], "d1.C01", "RGB.TIF");
> saveAs("Tiff", pathRGB);
> }
>        }
>
> print("C'est fini");
>
> --
> 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
|  
Report Content as Inappropriate

Re: Help Merge images

OBEID Patricia 154904
In reply to this post by Eric Denarier

Thanks Eric but it doesn't work either ... :-(
Patricia

________________________________________
De : ImageJ Interest Group [[hidden email]] de la part de DENARIER Eric
Envoyé : mercredi 12 avril 2017 16:53
À : [hidden email]
Objet : Re: Help Merge images

Hi Patricia,

It seems you are missing a [i] in line 20 :

channels = "green = ["+list[i]+"] red = ["+fileF+"] ";

shoud be : channels = "green = ["+list[i]+"] red = ["+fileF[i]+"] ";


Eric Denarier
Grenoble Institut des Neurosciences
Inserm U1216
Chemin Fortuné Ferrini
38700 La Tronche
France

Tél :33 (0)4 565 205 38

http://neurosciences.ujf-grenoble.fr/

Le 12/04/2017 à 15:22, Patricia OBEID a écrit :

> Hello everyone
> I have a problem with a script that worked. Today, I can not make a superimposition of images and I do not understand where the problem is ...
> Any help will be welcome. (I don't know how attach images to my message. The previous mail with images was rejected ...)
> Thank you
> Patricia
>
> The script is :
>     dir = getDirectory("Choose a Directory ");
>     dir2 = getDirectory("Choose Destination Directory ");
>
>        list = getFileList(dir);
>        setBatchMode(true);
>        for (i=0; i<list.length; i++) {
>               if (endsWith(list[i], "d1.C01")){
>
>               //Ouvre le fichier CTOr
>                       path = dir+list[i];
>                       //run("Bio-Formats Windowless Importer","open=[path] open_files");
>                       open(path);
>                       setMinAndMax(800, 20000);
>
>               //Ouvre le CE
>                       pathF = replace(path, "d1.C01", "d0.C01");
>                       fileF = replace(list[i], "d1.C01", "d0.C01");
>                       open(pathF);
>                       setMinAndMax(1000, 1800);
>
>                       channels = "green = ["+list[i]+"] red = ["+fileF+"] ";
>                       run("Merge Channels...", channels);
>
>                       pathRGB = dir2 + replace(list[i], "d1.C01", "RGB.TIF");
>                       saveAs("Tiff", pathRGB);
>                       }
>        }
>
> print("C'est fini");
>
> --
> 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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help Merge images

Eric Denarier
Sorry Patricia for the mistake,

This one is working for me. The names of the channels are simplified  by
renaming the images..

the RGB image is also closed before going on the loop.


    dir = getDirectory("Choose a Directory ");
    dir2 = getDirectory("Choose Destination Directory ");

     list = getFileList(dir);

       setBatchMode(true);
       for (i=0; i<list.length; i++) {
         if (endsWith(list[i], "01.tif")){

         //Ouvre le fichier CTOr
             path = dir+list[i];
                         open(path); rename ("A");
             setMinAndMax(800, 20000);

         //Ouvre le CE
             pathF = replace(path, "01.tif", "02.tif");
             fileF = replace(list[i], "01.tif", "02.tif");
             open(pathF); rename ("B");
             setMinAndMax(1000, 1800);

             channels = "green=A red=B ";
             run("Merge Channels...", channels);

             pathRGB = dir2 + replace(list[i], "01.tif", "RGB.TIF");
             saveAs("Tiff", pathRGB);
close();
             }
       }

print("C'est fini");

Eric Denarier
Grenoble Institut des Neurosciences
Inserm U1216
Chemin Fortuné Ferrini
38700 La Tronche
France

Tél :33 (0)4 565 205 38

http://neurosciences.ujf-grenoble.fr/

Le 12/04/2017 à 17:07, OBEID Patricia 154904 a écrit :

> Thanks Eric but it doesn't work either ... :-(
> Patricia
>
> ________________________________________
> De : ImageJ Interest Group [[hidden email]] de la part de DENARIER Eric
> Envoyé : mercredi 12 avril 2017 16:53
> À : [hidden email]
> Objet : Re: Help Merge images
>
> Hi Patricia,
>
> It seems you are missing a [i] in line 20 :
>
> channels = "green = ["+list[i]+"] red = ["+fileF+"] ";
>
> shoud be : channels = "green = ["+list[i]+"] red = ["+fileF[i]+"] ";
>
>
> Eric Denarier
> Grenoble Institut des Neurosciences
> Inserm U1216
> Chemin Fortuné Ferrini
> 38700 La Tronche
> France
>
> Tél :33 (0)4 565 205 38
>
> http://neurosciences.ujf-grenoble.fr/
>
> Le 12/04/2017 à 15:22, Patricia OBEID a écrit :
>> Hello everyone
>> I have a problem with a script that worked. Today, I can not make a superimposition of images and I do not understand where the problem is ...
>> Any help will be welcome. (I don't know how attach images to my message. The previous mail with images was rejected ...)
>> Thank you
>> Patricia
>>
>> The script is :
>>      dir = getDirectory("Choose a Directory ");
>>      dir2 = getDirectory("Choose Destination Directory ");
>>
>>         list = getFileList(dir);
>>         setBatchMode(true);
>>         for (i=0; i<list.length; i++) {
>>                if (endsWith(list[i], "d1.C01")){
>>
>>                //Ouvre le fichier CTOr
>>                        path = dir+list[i];
>>                        //run("Bio-Formats Windowless Importer","open=[path] open_files");
>>                        open(path);
>>                        setMinAndMax(800, 20000);
>>
>>                //Ouvre le CE
>>                        pathF = replace(path, "d1.C01", "d0.C01");
>>                        fileF = replace(list[i], "d1.C01", "d0.C01");
>>                        open(pathF);
>>                        setMinAndMax(1000, 1800);
>>
>>                        channels = "green = ["+list[i]+"] red = ["+fileF+"] ";
>>                        run("Merge Channels...", channels);
>>
>>                        pathRGB = dir2 + replace(list[i], "d1.C01", "RGB.TIF");
>>                        saveAs("Tiff", pathRGB);
>>                        }
>>         }
>>
>> print("C'est fini");
>>
>> --
>> 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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help Merge images

OBEID Patricia 154904
This time it's perfect!
Thank you very much Eric.
But I do not understand why it is necessary to rename the images  :    open (path); Rename ("A"); ...
Patricia
_______________________________________
Patricia OBEÏD
Animateur Informatique Biomics
CEA Grenoble
DRF / BIG / BGE U1038/ Biomics / Bât 4020
17 rue des Martyrs
38054 GRENOBLE Cedex 9

Email : [hidden email]
Tél : (+33)4 38 78 47 12 Fax : (+33)4 38 78 59 17
http://irtsv.cea.fr/dsv/irtsv/Pages/BGE/Biomics/Accueil.aspx
https://twitter.com/BiomicsLab

________________________________________
De : ImageJ Interest Group [[hidden email]] de la part de DENARIER Eric
Envoyé : mercredi 12 avril 2017 17:51
À : [hidden email]
Objet : Re: Help Merge images

Sorry Patricia for the mistake,

This one is working for me. The names of the channels are simplified by
renaming the images..

the RGB image is also closed before going on the loop.


dir = getDirectory("Choose a Directory ");
dir2 = getDirectory("Choose Destination Directory ");

list = getFileList(dir);

setBatchMode(true);
for (i=0; i<list.length; i++) {
if (endsWith(list[i], "01.tif")){

//Ouvre le fichier CTOr
path = dir+list[i];
open(path); rename ("A");
setMinAndMax(800, 20000);

//Ouvre le CE
pathF = replace(path, "01.tif", "02.tif");
fileF = replace(list[i], "01.tif", "02.tif");
open(pathF); rename ("B");
setMinAndMax(1000, 1800);

channels = "green=A red=B ";
run("Merge Channels...", channels);

pathRGB = dir2 + replace(list[i], "01.tif", "RGB.TIF");
saveAs("Tiff", pathRGB);
close();
}
}

print("C'est fini");

Eric Denarier
Grenoble Institut des Neurosciences
Inserm U1216
Chemin Fortuné Ferrini
38700 La Tronche
France

Tél :33 (0)4 565 205 38

http://neurosciences.ujf-grenoble.fr/

Le 12/04/2017 à 17:07, OBEID Patricia 154904 a écrit :

> Thanks Eric but it doesn't work either ... :-(
> Patricia
>
> ________________________________________
> De : ImageJ Interest Group [[hidden email]] de la part de DENARIER Eric
> Envoyé : mercredi 12 avril 2017 16:53
> À : [hidden email]
> Objet : Re: Help Merge images
>
> Hi Patricia,
>
> It seems you are missing a [i] in line 20 :
>
> channels = "green = ["+list[i]+"] red = ["+fileF+"] ";
>
> shoud be : channels = "green = ["+list[i]+"] red = ["+fileF[i]+"] ";
>
>
> Eric Denarier
> Grenoble Institut des Neurosciences
> Inserm U1216
> Chemin Fortuné Ferrini
> 38700 La Tronche
> France
>
> Tél :33 (0)4 565 205 38
>
> http://neurosciences.ujf-grenoble.fr/
>
> Le 12/04/2017 à 15:22, Patricia OBEID a écrit :
>> Hello everyone
>> I have a problem with a script that worked. Today, I can not make a superimposition of images and I do not understand where the problem is ...
>> Any help will be welcome. (I don't know how attach images to my message. The previous mail with images was rejected ...)
>> Thank you
>> Patricia
>>
>> The script is :
>> dir = getDirectory("Choose a Directory ");
>> dir2 = getDirectory("Choose Destination Directory ");
>>
>> list = getFileList(dir);
>> setBatchMode(true);
>> for (i=0; i<list.length; i++) {
>> if (endsWith(list[i], "d1.C01")){
>>
>> //Ouvre le fichier CTOr
>> path = dir+list[i];
>> //run("Bio-Formats Windowless Importer","open=[path] open_files");
>> open(path);
>> setMinAndMax(800, 20000);
>>
>> //Ouvre le CE
>> pathF = replace(path, "d1.C01", "d0.C01");
>> fileF = replace(list[i], "d1.C01", "d0.C01");
>> open(pathF);
>> setMinAndMax(1000, 1800);
>>
>> channels = "green = ["+list[i]+"] red = ["+fileF+"] ";
>> run("Merge Channels...", channels);
>>
>> pathRGB = dir2 + replace(list[i], "d1.C01", "RGB.TIF");
>> saveAs("Tiff", pathRGB);
>> }
>> }
>>
>> print("C'est fini");
>>
>> --
>> 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

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

Re: Help Merge images

Straatman, Kees (Dr.)
Is it possible that there are spaces in the path or file names?

Kees

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of OBEID Patricia 154904
Sent: 12 April 2017 17:18
To: [hidden email]
Subject: Re: Help Merge images

This time it's perfect!
Thank you very much Eric.
But I do not understand why it is necessary to rename the images  :    open (path); Rename ("A"); ...
Patricia
_______________________________________
Patricia OBEÏD
Animateur Informatique Biomics
CEA Grenoble
DRF / BIG / BGE U1038/ Biomics / Bât 4020
17 rue des Martyrs
38054 GRENOBLE Cedex 9

Email : [hidden email]
Tél : (+33)4 38 78 47 12 Fax : (+33)4 38 78 59 17 http://irtsv.cea.fr/dsv/irtsv/Pages/BGE/Biomics/Accueil.aspx
https://twitter.com/BiomicsLab

________________________________________
De : ImageJ Interest Group [[hidden email]] de la part de DENARIER Eric Envoyé : mercredi 12 avril 2017 17:51 À : [hidden email] Objet : Re: Help Merge images

Sorry Patricia for the mistake,

This one is working for me. The names of the channels are simplified by renaming the images..

the RGB image is also closed before going on the loop.


dir = getDirectory("Choose a Directory ");
dir2 = getDirectory("Choose Destination Directory ");

list = getFileList(dir);

setBatchMode(true);
for (i=0; i<list.length; i++) {
if (endsWith(list[i], "01.tif")){

//Ouvre le fichier CTOr
path = dir+list[i];
open(path); rename ("A");
setMinAndMax(800, 20000);

//Ouvre le CE
pathF = replace(path, "01.tif", "02.tif"); fileF = replace(list[i], "01.tif", "02.tif"); open(pathF); rename ("B"); setMinAndMax(1000, 1800);

channels = "green=A red=B ";
run("Merge Channels...", channels);

pathRGB = dir2 + replace(list[i], "01.tif", "RGB.TIF"); saveAs("Tiff", pathRGB); close(); } }

print("C'est fini");

Eric Denarier
Grenoble Institut des Neurosciences
Inserm U1216
Chemin Fortuné Ferrini
38700 La Tronche
France

Tél :33 (0)4 565 205 38

http://neurosciences.ujf-grenoble.fr/

Le 12/04/2017 à 17:07, OBEID Patricia 154904 a écrit :

> Thanks Eric but it doesn't work either ... :-( Patricia
>
> ________________________________________
> De : ImageJ Interest Group [[hidden email]] de la part de
> DENARIER Eric Envoyé : mercredi 12 avril 2017 16:53 À :
> [hidden email] Objet : Re: Help Merge images
>
> Hi Patricia,
>
> It seems you are missing a [i] in line 20 :
>
> channels = "green = ["+list[i]+"] red = ["+fileF+"] ";
>
> shoud be : channels = "green = ["+list[i]+"] red = ["+fileF[i]+"] ";
>
>
> Eric Denarier
> Grenoble Institut des Neurosciences
> Inserm U1216
> Chemin Fortuné Ferrini
> 38700 La Tronche
> France
>
> Tél :33 (0)4 565 205 38
>
> http://neurosciences.ujf-grenoble.fr/
>
> Le 12/04/2017 à 15:22, Patricia OBEID a écrit :
>> Hello everyone
>> I have a problem with a script that worked. Today, I can not make a superimposition of images and I do not understand where the problem is ...
>> Any help will be welcome. (I don't know how attach images to my
>> message. The previous mail with images was rejected ...) Thank you
>> Patricia
>>
>> The script is :
>> dir = getDirectory("Choose a Directory ");
>> dir2 = getDirectory("Choose Destination Directory ");
>>
>> list = getFileList(dir);
>> setBatchMode(true);
>> for (i=0; i<list.length; i++) {
>> if (endsWith(list[i], "d1.C01")){
>>
>> //Ouvre le fichier CTOr
>> path = dir+list[i];
>> //run("Bio-Formats Windowless Importer","open=[path] open_files");
>> open(path); setMinAndMax(800, 20000);
>>
>> //Ouvre le CE
>> pathF = replace(path, "d1.C01", "d0.C01"); fileF = replace(list[i],
>> "d1.C01", "d0.C01"); open(pathF); setMinAndMax(1000, 1800);
>>
>> channels = "green = ["+list[i]+"] red = ["+fileF+"] "; run("Merge
>> Channels...", channels);
>>
>> pathRGB = dir2 + replace(list[i], "d1.C01", "RGB.TIF");
>> saveAs("Tiff", pathRGB); } }
>>
>> print("C'est fini");
>>
>> --
>> 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

--
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
|  
Report Content as Inappropriate

Re: Help Merge images

OBEID Patricia 154904
No, that's not possible.
Here is an example :
GRE047503_170413070001_C07f00d2.C01
Thanks
Patricia

_______________________________________
Patricia OBEÏD
Animateur Informatique Biomics
CEA Grenoble
DRF / BIG / BGE U1038/ Biomics / Bât 4020
17 rue des Martyrs
38054 GRENOBLE Cedex 9
 
Email : [hidden email]
Tél : (+33)4 38 78 47 12
Fax : (+33)4 38 78 59 17
http://www.cea.fr/drf/big/bge/biomics
https://twitter.com/BiomicsLab



-----Message d'origine-----
De : ImageJ Interest Group [mailto:[hidden email]] De la part de Straatman, Kees (Dr.)
Envoyé : mercredi 19 avril 2017 18:19
À : [hidden email]
Objet : Re: Help Merge images

Is it possible that there are spaces in the path or file names?

Kees

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of OBEID Patricia 154904
Sent: 12 April 2017 17:18
To: [hidden email]
Subject: Re: Help Merge images

This time it's perfect!
Thank you very much Eric.
But I do not understand why it is necessary to rename the images  :    open (path); Rename ("A"); ...
Patricia
_______________________________________
Patricia OBEÏD
Animateur Informatique Biomics
CEA Grenoble
DRF / BIG / BGE U1038/ Biomics / Bât 4020
17 rue des Martyrs
38054 GRENOBLE Cedex 9

Email : [hidden email]
Tél : (+33)4 38 78 47 12 Fax : (+33)4 38 78 59 17 http://irtsv.cea.fr/dsv/irtsv/Pages/BGE/Biomics/Accueil.aspx
https://twitter.com/BiomicsLab

________________________________________
De : ImageJ Interest Group [[hidden email]] de la part de DENARIER Eric Envoyé : mercredi 12 avril 2017 17:51 À : [hidden email] Objet : Re: Help Merge images

Sorry Patricia for the mistake,

This one is working for me. The names of the channels are simplified by renaming the images..

the RGB image is also closed before going on the loop.


dir = getDirectory("Choose a Directory ");
dir2 = getDirectory("Choose Destination Directory ");

list = getFileList(dir);

setBatchMode(true);
for (i=0; i<list.length; i++) {
if (endsWith(list[i], "01.tif")){

//Ouvre le fichier CTOr
path = dir+list[i];
open(path); rename ("A");
setMinAndMax(800, 20000);

//Ouvre le CE
pathF = replace(path, "01.tif", "02.tif"); fileF = replace(list[i], "01.tif", "02.tif"); open(pathF); rename ("B"); setMinAndMax(1000, 1800);

channels = "green=A red=B ";
run("Merge Channels...", channels);

pathRGB = dir2 + replace(list[i], "01.tif", "RGB.TIF"); saveAs("Tiff", pathRGB); close(); } }

print("C'est fini");

Eric Denarier
Grenoble Institut des Neurosciences
Inserm U1216
Chemin Fortuné Ferrini
38700 La Tronche
France

Tél :33 (0)4 565 205 38

http://neurosciences.ujf-grenoble.fr/

Le 12/04/2017 à 17:07, OBEID Patricia 154904 a écrit :

> Thanks Eric but it doesn't work either ... :-( Patricia
>
> ________________________________________
> De : ImageJ Interest Group [[hidden email]] de la part de
> DENARIER Eric Envoyé : mercredi 12 avril 2017 16:53 À :
> [hidden email] Objet : Re: Help Merge images
>
> Hi Patricia,
>
> It seems you are missing a [i] in line 20 :
>
> channels = "green = ["+list[i]+"] red = ["+fileF+"] ";
>
> shoud be : channels = "green = ["+list[i]+"] red = ["+fileF[i]+"] ";
>
>
> Eric Denarier
> Grenoble Institut des Neurosciences
> Inserm U1216
> Chemin Fortuné Ferrini
> 38700 La Tronche
> France
>
> Tél :33 (0)4 565 205 38
>
> http://neurosciences.ujf-grenoble.fr/
>
> Le 12/04/2017 à 15:22, Patricia OBEID a écrit :
>> Hello everyone
>> I have a problem with a script that worked. Today, I can not make a superimposition of images and I do not understand where the problem is ...
>> Any help will be welcome. (I don't know how attach images to my
>> message. The previous mail with images was rejected ...) Thank you
>> Patricia
>>
>> The script is :
>> dir = getDirectory("Choose a Directory ");
>> dir2 = getDirectory("Choose Destination Directory ");
>>
>> list = getFileList(dir);
>> setBatchMode(true);
>> for (i=0; i<list.length; i++) {
>> if (endsWith(list[i], "d1.C01")){
>>
>> //Ouvre le fichier CTOr
>> path = dir+list[i];
>> //run("Bio-Formats Windowless Importer","open=[path] open_files");
>> open(path); setMinAndMax(800, 20000);
>>
>> //Ouvre le CE
>> pathF = replace(path, "d1.C01", "d0.C01"); fileF = replace(list[i],
>> "d1.C01", "d0.C01"); open(pathF); setMinAndMax(1000, 1800);
>>
>> channels = "green = ["+list[i]+"] red = ["+fileF+"] "; run("Merge
>> Channels...", channels);
>>
>> pathRGB = dir2 + replace(list[i], "d1.C01", "RGB.TIF");
>> saveAs("Tiff", pathRGB); } }
>>
>> print("C'est fini");
>>
>> --
>> 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

--
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
Loading...