import text image sequence ?

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

import text image sequence ?

Adrien Aubourg
Hi,

I'm currently writing down a C program which gives results into text
image files (tab for next value, new line for next line).
I used ImageJ to read these images with the import -> text image dialog.
It was working very well so far.

Now I want to display a set of text images. Unfortunately, the import ->
text image dialog doesn't support stack, and the import -> image
sequence doesn't handle text images.

I was looking for a plugin that brings HandleExtraFileTypes csv support.
But I didn't find one.

Is there any chance such a plugin exists ? Is such anything planned for
future versions ?

I'm currently using a matlab homemade function to read these files, but
you'll say that's to much, and you'll be right.

Thank you very much,

Adrien
//
Reply | Threaded
Open this post in threaded view
|

Re: import text image sequence ?

ctrueden
Hi Adrien,

Now I want to display a set of text images. Unfortunately, the import ->
> text image dialog doesn't support stack, and the import -> image sequence
> doesn't handle text images.
>

Why not write a macro to loop over your text images? Something like:

directory = getDirectory("Choose directory");
fileList = getFileList(directory);
setBatchMode(true);
for (i=0; i<fileList.length; i++) {
  file = directory + fileList[i];
  run("Text Image... ", "open=[" + file + "]");
}
run("Images to Stack", "name=Stack title=[] use");

I used Plugins > Macros > Record to generate the key commands needed.

Regards,
Curtis


On Tue, Nov 22, 2011 at 10:09 AM, Adrien Aubourg
<[hidden email]>wrote:

> Hi,
>
> I'm currently writing down a C program which gives results into text image
> files (tab for next value, new line for next line).
> I used ImageJ to read these images with the import -> text image dialog.
> It was working very well so far.
>
> Now I want to display a set of text images. Unfortunately, the import ->
> text image dialog doesn't support stack, and the import -> image sequence
> doesn't handle text images.
>
> I was looking for a plugin that brings HandleExtraFileTypes csv support.
> But I didn't find one.
>
> Is there any chance such a plugin exists ? Is such anything planned for
> future versions ?
>
> I'm currently using a matlab homemade function to read these files, but
> you'll say that's to much, and you'll be right.
>
> Thank you very much,
>
> Adrien
> //
>
Reply | Threaded
Open this post in threaded view
|

Re: import text image sequence ?

amirhosein999
Can you please go through details on how we should use this script in ImageJ or Fiji. I tried to do that but couldn't. Maybe because I'm not much familiar with using macros in Fiji. Here is the things that I've done so far:

I saved this script in text file (ImportTextImageSequence.txt):
------------------------------------------------------------
dir = getDirectory("Choose directory");
list = getFileList(dir);
run("Close All");
setBatchMode(true);
for (i=0; i<list.length; i++) {
 file = dir + list[i];
 run("Text Image... ", "open=&file");
}
run("Images to Stack", "use");
setBatchMode(false);
------------------------------------------------------------
And then opened Fiji, Plugins>Macros>Install... and select above text file. I saw a short message afterwards:

    "1 macro installed."

Then I went to Plugins>Macros>Run... and again chose the .ijm installed file (ImportTextImageSequence.ijm) at '/opt/Fiji/plugins/'. A new window was opened with title "Choose directory". It looks the macro is working, but I do not know which directory I should choose afterwards. I tried to choose the directory containing my text images (image_01.txt, image_02.txt, ...) but it gave me this error message:

    "Line 2 is not the same length as the first line."

Also, when I tried to open by File>Import>Image Sequence..., I saw this message:

    "The folder does not apper to contain any TIFF, JPEG, BMP, DICOM, GIF, FITS or PGM files."

which means that text image sequence is not installed at this part of Fiji at least.

I searched a lot but could not find anyone has explained the procedure in details. It looks that just you guys have discussed about this macro here. I would be thankful if you clarify this issue.

P.S. My Fiji is updated at CentOS 7 and I used it earlier without any problems in image processing and also importing TIFF image sequences.
Reply | Threaded
Open this post in threaded view
|

Re: import text image sequence ?

ctrueden
Hi Amit,

Since you asked this question in another thread, and said it is now
working, I assume all is well.

For the archives, the other thread is:
http://imagej.1557.x6.nabble.com/open-text-image-sequence-tp4999149p5014239.html

Regards,
Curtis

On Thu, Sep 3, 2015 at 12:13 PM, amirhosein999 <[hidden email]>
wrote:

> Can you please go through details on how we should use this script in
> ImageJ
> or Fiji. I tried to do that but couldn't. Maybe because I'm not much
> familiar with using macros in Fiji. Here is the things that I've done so
> far:
>
> I saved this script in text file (ImportTextImageSequence.txt):
> ------------------------------------------------------------
> dir = getDirectory("Choose directory");
> list = getFileList(dir);
> run("Close All");
> setBatchMode(true);
> for (i=0; i<list.length; i++) {
>  file = dir + list[i];
>  run("Text Image... ", "open=&file");
> }
> run("Images to Stack", "use");
> setBatchMode(false);
> ------------------------------------------------------------
> And then opened Fiji, Plugins>Macros>Install... and select above text file.
> I saw a short message afterwards:
>
>     "1 macro installed."
>
> Then I went to Plugins>Macros>Run... and again chose the .ijm installed
> file
> (ImportTextImageSequence.ijm) at '/opt/Fiji/plugins/'. A new window was
> opened with title "Choose directory". It looks the macro is working, but I
> do not know which directory I should choose afterwards. I tried to choose
> the directory containing my text images (image_01.txt, image_02.txt, ...)
> but it gave me this error message:
>
>     "Line 2 is not the same length as the first line."
>
> Also, when I tried to open by File>Import>Image Sequence..., I saw this
> message:
>
>     "The folder does not apper to contain any TIFF, JPEG, BMP, DICOM, GIF,
> FITS or PGM files."
>
> which means that text image sequence is not installed at this part of Fiji
> at least.
>
> I searched a lot but could not find anyone has explained the procedure in
> details. It looks that just you guys have discussed about this macro here.
> I
> would be thankful if you clarify this issue.
>
> P.S. My Fiji is updated at CentOS 7 and I used it earlier without any
> problems in image processing and also importing TIFF image sequences.
>
>
>
> --
> View this message in context:
> http://imagej.1557.x6.nabble.com/import-text-image-sequence-tp3682503p5014234.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