BUG OpenNext command preserve isHyperstack flag from previous image

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

BUG OpenNext command preserve isHyperstack flag from previous image

Schebique
Hello.

I noticed that if I use Open Next command for single plane 8 or 16 bit
images (.dcm in my case, but doesnt matter) when the first one was changed
to hyperstack, the Stack.isHyperstack macro command returns true even that
newly open (next) image clearly could not be. Here is a minimal macro
demonstrating the problem. You only need a folder with at least two single
plane 8 or 16 bit .tif files.

//originally this occure to me with MRI .dcm files
file=File.openDialog("choose first of 8 or 16 bit single plane images.
There must be at least 2 in folder");
open(file);
n=nSlices;
//if (is("composite")) print(getTitle()+" is composite");
if (Stack.isHyperstack) print(getTitle()+" is hyperstack");
else print(getTitle()+" is not hyperstack yet");
run("Add Slice", "add=channel");
run("Add Slice", "add=channel");
run("Stack to Hyperstack...", "order=xyczt(default) channels="+n+2+"
slices=1 frames=1 display=Composite");
print(getTitle()+" is converted to hyperstack now");

run("Open Next");
if (Stack.isHyperstack) print(getTitle()+" is marked as hyperstack and
should not be!");
else print(getTitle()+" is not hyperstack");

-------------------------------
my log says...
Mik101_Ti_sin1224-8bit.tif is not hyperstack yet
Mik101_Ti_sin1224-8bit.tif is converted to hyperstack now
Mik1056_Ti_sin1414-8bit.tif is marked as hyperstack and should not be!

-------------------------------
  java.version: 1.8.0_66
  java.vendor: Oracle Corporation
  os.name: Linux
  os.version: 3.13.0-24-generic
  os.arch: amd64
  IJ.getVersion: 2.0.0-rc-49/1.51a
  IJ.getFullVersion: 1.51a99
  IJ.isJava17: true
  IJ.isJava18: true
  IJ.isLinux: true
  IJ.isMacintosh: false
  IJ.isMacOSX: false
  IJ.isWindows: false
  IJ.is64Bit: true



Thank you for attention.
Ondrej Sebesta

--
Mgr. Ondřej Šebesta
Laboratory of Confocal and Fluorescence Microscopy
Faculty of Science, Charles University in Prague
Vinicna 7
128 44 Prague
Czech Republic

Phone: +420 2 2195 1943
e-mail: [hidden email]

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

Re: BUG OpenNext command preserve isHyperstack flag from previous image

Rasband, Wayne (NIH/NIMH) [E]
> On May 31, 2016, at 10:54 AM, Ondřej Šebesta <[hidden email]> wrote:
>
> Hello.
>
> I noticed that if I use Open Next command for single plane 8 or 16 bit
> images (.dcm in my case, but doesnt matter) when the first one was changed
> to hyperstack, the Stack.isHyperstack macro command returns true even that
> newly open (next) image clearly could not be. Here is a minimal macro
> demonstrating the problem. You only need a folder with at least two single
> plane 8 or 16 bit .tif files.

This bug is fixed in the latest ImageJ daily build (1.51b23).

-wayne

> //originally this occure to me with MRI .dcm files
> file=File.openDialog("choose first of 8 or 16 bit single plane images.
> There must be at least 2 in folder");
> open(file);
> n=nSlices;
> //if (is("composite")) print(getTitle()+" is composite");
> if (Stack.isHyperstack) print(getTitle()+" is hyperstack");
> else print(getTitle()+" is not hyperstack yet");
> run("Add Slice", "add=channel");
> run("Add Slice", "add=channel");
> run("Stack to Hyperstack...", "order=xyczt(default) channels="+n+2+"
> slices=1 frames=1 display=Composite");
> print(getTitle()+" is converted to hyperstack now");
>
> run("Open Next");
> if (Stack.isHyperstack) print(getTitle()+" is marked as hyperstack and
> should not be!");
> else print(getTitle()+" is not hyperstack");
>
> -------------------------------
> my log says...
> Mik101_Ti_sin1224-8bit.tif is not hyperstack yet
> Mik101_Ti_sin1224-8bit.tif is converted to hyperstack now
> Mik1056_Ti_sin1414-8bit.tif is marked as hyperstack and should not be!
>
> -------------------------------
>  java.version: 1.8.0_66
>  java.vendor: Oracle Corporation
>  os.name: Linux
>  os.version: 3.13.0-24-generic
>  os.arch: amd64
>  IJ.getVersion: 2.0.0-rc-49/1.51a
>  IJ.getFullVersion: 1.51a99
>  IJ.isJava17: true
>  IJ.isJava18: true
>  IJ.isLinux: true
>  IJ.isMacintosh: false
>  IJ.isMacOSX: false
>  IJ.isWindows: false
>  IJ.is64Bit: true
>
>
>
> Thank you for attention.
> Ondrej Sebesta

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