Login  Register

Re: negative z spacing

Posted by W. Chan on Mar 12, 2009; 8:46pm
URL: http://imagej.273.s1.nabble.com/negative-z-spacing-tp3693317p3693319.html

Thanks Wayne.  It works.

On Thu, 12 Mar 2009, Rasband Wayne wrote:

> ImageJ does not support negative slice spacing. You should be able to work
> around this problem by removing the minus sign from "Voxel Depth" in the
> Image>Properties dialog box.
>
> -wayne
>
> On Mar 12, 2009, at 12:06 AM, W. Chan wrote:
>
> > Hi
> >
> > I have some z stacks with a negative Z spacing and when I did a Image |
> > Stacks | Reslice ..., I got an exception (1.42h, java 1.6.0_12 on win xp
> > sp3).
> >
> > java.lang.NullPointerException
> > at ij.ImagePlus.setStack(ImagePlus.java:509)
> > at ij.ImagePlus.<init>(ImagePlus.java:144)
> > at ij.plugin.Slicer.resliceRectOrLine(Slicer.java:298)
> > at ij.plugin.Slicer.reslice(Slicer.java:100)
> > at ij.plugin.Slicer.run(Slicer.java:70)
> > at ij.IJ.runPlugIn(IJ.java:149)
> > at ij.Executer.runCommand(Executer.java:119)
> > at ij.Executer.run(Executer.java:58)
> > at java.lang.Thread.run(Unknown Source)
> >
> > I can eliminate the error by either removing the negative sign for both
> > input and output Z spacing, or  select avoid interpolation (but will mess
> > up the aspect ratio).  However, in the daily build 1.42k, there is only a
> > single entry for slice spacing.  When I left the negative sign in place, I
> > got a nullpointer exception as above.  When I removed the negative sign, I
> > got another error.
> >
> > java.lang.NegativeArraySizeException
> > at
> > ij.process.ByteProcessor.createProcessor(ByteProcessor.java:117)
> > at ij.process.ByteProcessor.resize(ByteProcessor.java:893)
> > at ij.plugin.Slicer.getSlice(Slicer.java:355)
> > at ij.plugin.Slicer.resliceRectOrLine(Slicer.java:290)
> > at ij.plugin.Slicer.reslice(Slicer.java:101)
> > at ij.plugin.Slicer.run(Slicer.java:71)
> > at ij.IJ.runPlugIn(IJ.java:150)
> > at ij.Executer.runCommand(Executer.java:119)
> > at ij.Executer.run(Executer.java:58)
> > at java.lang.Thread.run(Unknown Source)
> >
> > How do I go about fixing this?
> >
> > I obtained z stacks on 2 BioRad confocals using either CoMOS or LaserSharp
> > 2000.  In both software, the slices are arranged in the order they are
> > acquired and not by the axial position.  Positive direction is defined
> > as going into the sample. If I acquire the bottom slice first, I will get
> > a negative slice spacing and an inverted stack with respect to the actual
> > Z-position.  You can see an example here.
> >
> > http://staff.washington.edu/wpchan/mrc/zstack.html
> >
> > I can use Bob Dougherty's stack sorter to reverse the stack but it still
> > has the negative Z spacing that can cause reslice to choke.  I wonder how
> > other software packages operate in similar situation.  Do they generate a
> > negative z spacing?  Thanks for any advice.
> >

--
Pang (Wai Pang Chan, [hidden email], PAB A087, 206-685-1519)
The Biology Imaging Facility (http://staff.washington.edu/wpchan/if/)