MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / createHyperStack

Method createHyperStack

ij/src/main/java/ij/ImagePlus.java:2781–2799  ·  view source on GitHub ↗

This method has been replaced by IJ.createHyperStack().

(String title, int channels, int slices, int frames, int bitDepth)

Source from the content-addressed store, hash-verified

2779
2780 /** This method has been replaced by IJ.createHyperStack(). */
2781 public ImagePlus createHyperStack(String title, int channels, int slices, int frames, int bitDepth) {
2782 int size = channels*slices*frames;
2783 ImageStack stack2 = new ImageStack(width, height, size); // create empty stack
2784 ImageProcessor ip2 = null;
2785 switch (bitDepth) {
2786 case 8: ip2 = new ByteProcessor(width, height); break;
2787 case 16: ip2 = new ShortProcessor(width, height); break;
2788 case 24: ip2 = new ColorProcessor(width, height); break;
2789 case 32: ip2 = new FloatProcessor(width, height); break;
2790 default: throw new IllegalArgumentException("Invalid bit depth");
2791 }
2792 stack2.setPixels(ip2.getPixels(), 1); // can't create ImagePlus will null 1st image
2793 ImagePlus imp2 = new ImagePlus(title, stack2);
2794 stack2.setPixels(null, 1);
2795 imp2.setDimensions(channels, slices, frames);
2796 imp2.setCalibration(getCalibration());
2797 imp2.setOpenAsHyperStack(true);
2798 return imp2;
2799 }
2800
2801 /** Copies the calibration of the specified image to this image. */
2802 public void copyScale(ImagePlus imp) {

Callers 2

resliceHyperstackMethod · 0.95

Calls 6

setPixelsMethod · 0.95
getPixelsMethod · 0.95
setDimensionsMethod · 0.95
setCalibrationMethod · 0.95
getCalibrationMethod · 0.95
setOpenAsHyperStackMethod · 0.95

Tested by

no test coverage detected