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

Method split

ij/src/main/java/ij/plugin/frame/RoiManager.java:2040–2056  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2038 }
2039
2040 void split() {
2041 ImagePlus imp = getImage();
2042 if (imp==null) return;
2043 Roi roi = imp.getRoi();
2044 if (roi==null || roi.getType()!=Roi.COMPOSITE) {
2045 error("Image with composite selection required");
2046 return;
2047 }
2048 Recorder.suspendRecording();
2049 Roi[] rois = ((ShapeRoi)roi).getRois();
2050 for (int i=0; i<rois.length; i++) {
2051 imp.setRoi(rois[i]);
2052 addRoi(false);
2053 }
2054 Recorder.resumeRecording();
2055 if (record()) Recorder.record("roiManager", "Split");
2056 }
2057
2058 void showAll(int mode) {
2059 ImagePlus imp = WindowManager.getCurrentImage();

Callers 3

actionPerformedMethod · 0.95
runCommandMethod · 0.95
CommandsMethod · 0.45

Calls 11

getImageMethod · 0.95
getRoiMethod · 0.95
getTypeMethod · 0.95
errorMethod · 0.95
suspendRecordingMethod · 0.95
setRoiMethod · 0.95
addRoiMethod · 0.95
resumeRecordingMethod · 0.95
recordMethod · 0.95
recordMethod · 0.95
getRoisMethod · 0.45

Tested by

no test coverage detected