problem with text windows

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

problem with text windows

Cammer, Michael-3
I have switched to Fiji, but am having problems with text windows.


In standard ImageJ, each text window is easily accessible from the Window menu.  We can select it and then do commands such as:

  selectWindow("20200725_rawdata.txt");
  textdump = getInfo("window.contents");
  a = split(textdump);

However, in Fiji, the text windows are in the Java text editor, are not listed in the windows menu, and getInfo("window.contents") returns an error that no window can be found.

Therefore, macros we have written for ImageJ with text windows don't work.

Assistance would be greatly appreciated.


Thank you!


Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory

NYU Langone Health, 540 First Avenue, SK2 Microscopy Suite, New York, NY  10016

[hidden email]<mailto:[hidden email]>  http://nyulmc.org/micros  http://microscopynotes.com/

Voice direct only, no text or messages:  1-914-309-3270 and 1-646-501-0567


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

Re: problem with text windows

Krs5
Hi Michael,

Not sure this is correct. The below test macro runs fine on Fiji in Windows10

run("Blobs (25K)");
D = File.getDefaultDir;
saveAs("Text Image", D+"blobs.txt");
run("Text File... ", "open="+D+"blobs.txt");
selectWindow("blobs.txt");
textdump = getInfo("window.contents");
a = split(textdump);
for (i=0;i<20;i++)
  print(a[i]);
File.delete(D+"blobs.txt");

Best wishes

Kees

________________________________
From: ImageJ Interest Group  on behalf of Cammer, Michael <[hidden email]>
Sent: 25 July 2020 22:44
Subject: problem with text windows

I have switched to Fiji, but am having problems with text windows.


In standard ImageJ, each text window is easily accessible from the Window menu.  We can select it and then do commands such as:

  selectWindow("20200725_rawdata.txt");
  textdump = getInfo("window.contents");
  a = split(textdump);

However, in Fiji, the text windows are in the Java text editor, are not listed in the windows menu, and getInfo("window.contents") returns an error that no window can be found.

Therefore, macros we have written for ImageJ with text windows don't work.

Assistance would be greatly appreciated.


Thank you!


Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory

NYU Langone Health, 540 First Avenue, SK2 Microscopy Suite, New York, NY  10016

[hidden email]<mailto:[hidden email]>  https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fnyulmc.org%2Fmicros&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7C6ef40871f50b43cdc2dc08d830e3f073%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637313102853064255&amp;sdata=f7spjvSzJL9OuBpIPs4ihIDTjSM0RkWGQGpbWwUN1gY%3D&amp;reserved=0  https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmicroscopynotes.com%2F&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7C6ef40871f50b43cdc2dc08d830e3f073%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637313102853064255&amp;sdata=SOf2wQoUzUhczCEHSbqeKmi%2Fk10M7COOqyjylcCH%2FMY%3D&amp;reserved=0

Voice direct only, no text or messages:  1-914-309-3270 and 1-646-501-0567


--
ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&amp;data=02%7C01%7Ckrs5%40leicester.ac.uk%7C6ef40871f50b43cdc2dc08d830e3f073%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637313102853064255&amp;sdata=e2Ez3mwGs2iAePxnGj3WRg2%2BYy7pCCqLzHjgLfUxvXk%3D&amp;reserved=0

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

Re: problem with text windows

Cammer, Michael-3
Thank you for the reply.


Dragging and dropping a text file onto Fiji or using open command puts the text in the Java window where it is inaccessible to processing from within IJ.  These are changes.


Using Import > Text File  run("Text File... ", "open=

works fine.



Regards-


Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory

NYU Langone Health, 540 First Avenue, SK2 Microscopy Suite, New York, NY  10016

[hidden email]<mailto:[hidden email]>  http://nyulmc.org/micros  http://microscopynotes.com/

Voice direct only, no text or messages:  1-914-309-3270 and 1-646-501-0567



________________________________
From: Straatman, Kees (Dr.) <[hidden email]>
Sent: Monday, July 27, 2020 4:50:15 AM
To: [hidden email]
Subject: Re: problem with text windows

[EXTERNAL]

Hi Michael,

Not sure this is correct. The below test macro runs fine on Fiji in Windows10

run("Blobs (25K)");
D = File.getDefaultDir;
saveAs("Text Image", D+"blobs.txt");
run("Text File... ", "open="+D+"blobs.txt");
selectWindow("blobs.txt");
textdump = getInfo("window.contents");
a = split(textdump);
for (i=0;i<20;i++)
  print(a[i]);
File.delete(D+"blobs.txt");

Best wishes

Kees

________________________________
From: ImageJ Interest Group  on behalf of Cammer, Michael <[hidden email]>
Sent: 25 July 2020 22:44
Subject: problem with text windows

I have switched to Fiji, but am having problems with text windows.


In standard ImageJ, each text window is easily accessible from the Window menu.  We can select it and then do commands such as:

  selectWindow("20200725_rawdata.txt");
  textdump = getInfo("window.contents");
  a = split(textdump);

However, in Fiji, the text windows are in the Java text editor, are not listed in the windows menu, and getInfo("window.contents") returns an error that no window can be found.

Therefore, macros we have written for ImageJ with text windows don't work.

Assistance would be greatly appreciated.


Thank you!


Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory

NYU Langone Health, 540 First Avenue, SK2 Microscopy Suite, New York, NY  10016

[hidden email]<mailto:[hidden email]>  https://urldefense.proofpoint.com/v2/url?u=https-3A__eur03.safelinks.protection.outlook.com_-3Furl-3Dhttp-253A-252F-252Fnyulmc.org-252Fmicros-26amp-3Bdata-3D02-257C01-257Ckrs5-2540leicester.ac.uk-257C6ef40871f50b43cdc2dc08d830e3f073-257Caebecd6a31d44b0195ce8274afe853d9-257C0-257C0-257C637313102853064255-26amp-3Bsdata-3Df7spjvSzJL9OuBpIPs4ihIDTjSM0RkWGQGpbWwUN1gY-253D-26amp-3Breserved-3D0&d=DwIFAw&c=j5oPpO0eBH1iio48DtsedeElZfc04rx3ExJHeIIZuCs&r=hUBj2D5n6oKThx2L01qn8IORZb5f-ruLVXPmQ1zQNnM&m=7Ib0VUgRhhwUL2k7SollW9X1gjTB931ANsOSytdcD74&s=jD5ycsQ1Ue3qBVLZYHuUXU6abSEz9IaQ8foglE6ZVTk&e=   https://urldefense.proofpoint.com/v2/url?u=https-3A__eur03.safelinks.protection.outlook.com_-3Furl-3Dhttp-253A-252F-252Fmicroscopynotes.com-252F-26amp-3Bdata-3D02-257C01-257Ckrs5-2540leicester.ac.uk-257C6ef40871f50b43cdc2dc08d830e3f073-257Caebecd6a31d44b0195ce8274afe853d9-257C0-257C0-257C637313102853064255-26amp-3Bsdata-3DSOf2wQoUzUhczCEHSbqeKmi-252Fk10M7COOqyjylcCH-252FMY-253D-26amp-3Breserved-3D0&d=DwIFAw&c=j5oPpO0eBH1iio48DtsedeElZfc04rx3ExJHeIIZuCs&r=hUBj2D5n6oKThx2L01qn8IORZb5f-ruLVXPmQ1zQNnM&m=7Ib0VUgRhhwUL2k7SollW9X1gjTB931ANsOSytdcD74&s=ODiMnEXiGM-GyJ7iAiJIuHlvI0hbPUxcSmS4R5DTCiM&e=

Voice direct only, no text or messages:  1-914-309-3270 and 1-646-501-0567


--
ImageJ mailing list: https://urldefense.proofpoint.com/v2/url?u=https-3A__eur03.safelinks.protection.outlook.com_-3Furl-3Dhttp-253A-252F-252Fimagej.nih.gov-252Fij-252Flist.html-26amp-3Bdata-3D02-257C01-257Ckrs5-2540leicester.ac.uk-257C6ef40871f50b43cdc2dc08d830e3f073-257Caebecd6a31d44b0195ce8274afe853d9-257C0-257C0-257C637313102853064255-26amp-3Bsdata-3De2Ez3mwGs2iAePxnGj3WRg2-252BYy7pCCqLzHjgLfUxvXk-253D-26amp-3Breserved-3D0&d=DwIFAw&c=j5oPpO0eBH1iio48DtsedeElZfc04rx3ExJHeIIZuCs&r=hUBj2D5n6oKThx2L01qn8IORZb5f-ruLVXPmQ1zQNnM&m=7Ib0VUgRhhwUL2k7SollW9X1gjTB931ANsOSytdcD74&s=vve33pEGsgT-OQHlLM0uNNJe5lKW6KG25NCHpPGXdT0&e=

--
ImageJ mailing list: https://urldefense.proofpoint.com/v2/url?u=http-3A__imagej.nih.gov_ij_list.html&d=DwIFAw&c=j5oPpO0eBH1iio48DtsedeElZfc04rx3ExJHeIIZuCs&r=hUBj2D5n6oKThx2L01qn8IORZb5f-ruLVXPmQ1zQNnM&m=7Ib0VUgRhhwUL2k7SollW9X1gjTB931ANsOSytdcD74&s=r51OeZM5zRMyJ5IJFI8SfJ1Lw_uAM7UD9mQ0pjwugZw&e=

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