Loading/Importing Results table bug?

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

Loading/Importing Results table bug?

Gabriel Landini
Hi
If I do this to import a Results table into the current one (I want to
overwrite it):

myResults="TempResults.txt";
ijdir = getDirectory("imagej");
saveAs("Results", ijdir + myResults);

// the above saves it OK
// next the on screen table would be changed, although not in this macro
wait(2000);

// now I want to re-load the table I saved before.

run("Results...", "open="+ ijdir + myResults);
It asks me to save a file rather to load the one specified.

That does not seem correct.

And, more important, is there a way of loading the saved results table
silently?

Many thanks

Gabriel

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

Re: Loading/Importing Results table bug?

Michael Schmid
Hi Gabriel,

for importing, you should have
  run("Results... ", "open="+ ijdir + myResults);

Mind the space after the dots!
Without the space, it is the File>Save As>Results... command.

There are quite a few ImageJ commands where a single space makes a difference, especially in the File>Import and File>Save As menus, but also Process>Batch>Macro and Process>Math Macro, etc.

Michael
________________________________________________________________
On Feb 4, 2014, at 16:47, Gabriel Landini wrote:

> Hi
> If I do this to import a Results table into the current one (I want to
> overwrite it):
>
> myResults="TempResults.txt";
> ijdir = getDirectory("imagej");
> saveAs("Results", ijdir + myResults);
>
> // the above saves it OK
> // next the on screen table would be changed, although not in this macro
> wait(2000);
>
> // now I want to re-load the table I saved before.
>
> run("Results...", "open="+ ijdir + myResults);
> It asks me to save a file rather to load the one specified.
>
> That does not seem correct.
>
> And, more important, is there a way of loading the saved results table
> silently?
>
> Many thanks
>
> Gabriel
>
> --
> 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
|

Re: Loading/Importing Results table bug?

Gabriel Landini
On Tuesday 04 Feb 2014 18:01:59 you wrote:
> for importing, you should have
>   run("Results... ", "open="+ ijdir + myResults);
>
> Mind the space after the dots!
> Without the space, it is the File>Save As>Results... command.
>
> There are quite a few ImageJ commands where a single space makes a
> difference, especially in the File>Import and File>Save As menus, but also
> Process>Batch>Macro and Process>Math Macro, etc.

Hi Michael, thanks so much for spotting that invisible typo. :-)

Although that was my error, I still seem to have a problem with the imported
Result Table.

A macro I wrote some time ago to do morphological clustering stopped working
when using the principal components as parameters.
Not exactly sure what it is, but it seems that the imported Results data are
not really there, even if I can see them in the table window. It looks like if
the macro does not see the data in the table after computing the PCs  and
adding them to the table.
I will have to look a bit more in detail to find out what exactly is
happening, so I might be back on this.

Thanks again

Gabriel

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