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

Method allocateArrays

ij/src/main/java/ij/plugin/Projector.java:461–481  ·  view source on GitHub ↗
(int nProjections, int projwidth, int projheight)

Source from the content-addressed store, hash-verified

459
460
461 private void allocateArrays(int nProjections, int projwidth, int projheight) {
462 int projsize = projwidth*projheight;
463 ColorModel cm = imp.getProcessor().getColorModel();
464 if (isRGB) cm = null;
465 stack2 = new ImageStack(projwidth, projheight, cm);
466 projArray = new byte[projsize];
467 for (int i=0; i<nProjections; i++)
468 stack2.addSlice(null, new byte[projsize]);
469 if ((projectionMethod==nearestPoint) || (opacity > 0))
470 zBuffer = new short[projsize];
471 if ((opacity>0) && (projectionMethod!=nearestPoint))
472 opaArray = new byte[projsize];
473 if ((projectionMethod==brightestPoint) && (depthCueInt<100)) {
474 brightCueArray = new byte[projsize];
475 cueZBuffer = new short[projsize];
476 }
477 if (projectionMethod==meanValue) {
478 sumBuffer = new int[projsize];
479 countBuffer = new short[projsize];
480 }
481 }
482
483
484 /**

Callers 1

doProjectionsMethod · 0.95

Calls 3

getColorModelMethod · 0.45
getProcessorMethod · 0.45
addSliceMethod · 0.45

Tested by

no test coverage detected