Can't Recover ImagePlus after Stack Rotate

Posted by kacollins on
URL: http://imagej.273.s1.nabble.com/Can-t-Recover-ImagePlus-after-Stack-Rotate-tp3687248.html

I am writing a plugin that involves, amoung other things, rotating a stack. I have included the pertinent code below related to my problem. In ImageJ 1.42q, the code preserves the ImagePlus variable "imp" in line four (i.e. it is not null, and it contains the rotated data). In ImageJ 1.43u, the resulting value of imp is null. The only change is moving from 1.42q to 1.43u. I have gone back and forth and the problem only happens in 1.43u. How can I recover the imp related to s2 in version 1.43u?

------------------------

StackProcessor sp = new StackProcessor(imp.getStack(), ip);
ImageStack s2 = null;
s2 = sp.rotateLeft();
imp.setStack(null, s2);

if (imp == null)
     IJ.log("imp = null");

-------------------------


Thanks,
    Karen