FYI: crop changes slicelabel on single slice ImagePlus

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

FYI: crop changes slicelabel on single slice ImagePlus

Fred Damen

For some reason will use a separate method to
crop a single slice ImagePlus vs a multi-slice ImagePlus, even when the
"stack" option was passed.  The single slice method removes all the "\n"
in the sliceLabel on my datasets.  I suspect that it is due to the
following line:
if (label.length()>250 && label.indexOf('\n')>0 &&
label.contains("0002,")) ...
Although the ImagePlus is not a DICOM dataset, my sliceLabel(s) meet the
first two conditions, albeit, I can not see where it meets the last


PS: this work for a single slice ImagePlus

      ImageStack ris = smrimp.getStack();
      ImageProcessor rip = ris.getProcessor(1);
      rip = rip.crop();
      String rsl = ris.getSliceLabel(1);
      ris = new ImageStack(h,h);

ImageJ mailing list: