saving a "infor for..." file for a dicom image

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

saving a "infor for..." file for a dicom image

Tanusha Amrita Duffadar
Hi
I was wondering if someone could help me with answering a question
regarding running a macro from ImageJ. I am sure there is nothing wrong
with the macro itself but may be something with the way ImageJ is set-up
because the same txt file runs fine on another computer but gives an
error on my computer. I am on Linux x86 and running the latest version
of ImageJ 1.36.

while running the macro, it gives me an error at the point where im
trying to save a "Info for.." file (as a text file) for a  DICOM image
both of which are open , however it doesnt seem to recognise that the
"info for" file is open and gives the error

" This command requires a TextWindow such as the "Log" window or an
"Info  for..." window". Could anyone suggest as to why this might be
happening and a way to correct it. Thanks !
Reply | Threaded
Open this post in threaded view
|

Re: saving a "infor for..." file for a dicom image

Elena Kardash
something could be wrong with the path, maybe?
 in a macro the command allways goes to the specific location, it will
complain if cannot
find it.
elena
-------------------

> Hi
> I was wondering if someone could help me with answering a question
> regarding running a macro from ImageJ. I am sure there is nothing wrong
> with the macro itself but may be something with the way ImageJ is set-up
> because the same txt file runs fine on another computer but gives an
> error on my computer. I am on Linux x86 and running the latest version
> of ImageJ 1.36.
>
> while running the macro, it gives me an error at the point where im
> trying to save a "Info for.." file (as a text file) for a  DICOM image
> both of which are open , however it doesnt seem to recognise that the
> "info for" file is open and gives the error
>
> " This command requires a TextWindow such as the "Log" window or an
> "Info  for..." window". Could anyone suggest as to why this might be
> happening and a way to correct it. Thanks !
>
Reply | Threaded
Open this post in threaded view
|

Re: saving a "infor for..." file for a dicom image

Wayne Rasband
In reply to this post by Tanusha Amrita Duffadar
> I was wondering if someone could help me with answering a question  
> regarding running a macro from ImageJ. I am sure there is nothing  
> wrong with the macro itself but may be something with the way  
> ImageJ is set-up because the same txt file runs fine on another  
> computer but gives an error on my computer. I am on Linux x86 and  
> running the latest version of ImageJ 1.36.

> while running the macro, it gives me an error at the point where im  
> trying to save a "Info for.." file (as a text file) for a  DICOM  
> image both of which are open , however it doesnt seem to recognise  
> that the "info for" file is open and gives the error
>
> " This command requires a TextWindow such as the "Log" window or an  
> "Info  for..." window". Could anyone suggest as to why this might  
> be happening and a way to correct it. Thanks !

You can save the information displayed by the Image>Show Info command  
without opening a text window using this macro:

     info = getImageInfo();
     f= File.open(getDirectory("home")+"info.txt");
     print(f, tags);

The information is saved in the users home directory in a file named  
"info.txt". This macro requires ImageJ 1.35g or later, which adds the  
File.open() macro function.

-wayne