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

Method showDialog

ij/src/main/java/ij/plugin/Projector.java:104–163  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

102 }
103
104 private boolean showDialog() {
105 ImageProcessor ip = imp.getProcessor();
106 if (ip.isThreshold()) {
107 transparencyLower = (int)ip.getMinThreshold();
108 transparencyUpper = (int)ip.getMaxThreshold();
109 }
110 Calibration cal = imp.getCalibration();
111 boolean hyperstack = imp.isHyperStack() && imp.getNFrames()>1;
112 GenericDialog gd = new GenericDialog("3D Projection");
113 gd.addChoice("Projection method:", methodList, methodList[projectionMethod]);
114 gd.addChoice("Axis of rotation:", axisList, axisList[axisOfRotation]);
115 //gd.addMessage("");
116 gd.addNumericField("Slice spacing ("+cal.getUnits()+"):",cal.pixelDepth,2);
117
118 gd.addNumericField("Initial angle (0-359 degrees):", initAngle, 0);
119 gd.addNumericField("Total rotation (0-359 degrees):", totalAngle, 0);
120 gd.addNumericField("Rotation angle increment:", angleInc, 0);
121 gd.addNumericField("Lower transparency bound:", transparencyLower, 0);
122 gd.addNumericField("Upper transparency bound:", transparencyUpper, 0);
123 gd.addNumericField("Opacity (0-100%):", opacity, 0);
124 gd.addNumericField("Surface depth-cueing (0-100%):", 100-depthCueSurf, 0);
125 gd.addNumericField("Interior depth-cueing (0-100%):", 100-depthCueInt, 0);
126 gd.addCheckbox("Interpolate", interpolate);
127 if (hyperstack)
128 gd.addCheckbox("All time points", allTimePoints);
129 //gd.addCheckbox("Debug Mode:", debugMode);
130
131 gd.addHelp(IJ.URL2+"/docs/menus/image.html#project");
132 gd.showDialog();
133 if (gd.wasCanceled())
134 return false;;
135 projectionMethod = gd.getNextChoiceIndex();
136 axisOfRotation = gd.getNextChoiceIndex();
137 cal.pixelDepth = gd.getNextNumber();
138 if (cal.pixelWidth==0.0) cal.pixelWidth = 1.0;
139 sliceInterval = cal.pixelDepth/cal.pixelWidth;
140 initAngle = (int)gd.getNextNumber();
141 totalAngle = (int)gd.getNextNumber();
142 angleInc = (int)gd.getNextNumber();
143 transparencyLower = (int)gd.getNextNumber();
144 transparencyUpper = (int)gd.getNextNumber();
145 opacity = (int)gd.getNextNumber();
146 depthCueSurf = 100-(int)gd.getNextNumber();
147 depthCueInt = 100-(int)gd.getNextNumber();
148 interpolate = gd.getNextBoolean();
149 if (hyperstack)
150 allTimePoints = gd.getNextBoolean();
151 //debugMode = gd.getNextBoolean();
152 axisOfRotationS = axisOfRotation;
153 projectionMethodS = projectionMethod;
154 initAngleS = initAngle;
155 totalAngleS = totalAngle;
156 angleIncS = angleInc;
157 opacityS = opacity;
158 depthCueSurfS = depthCueSurf;
159 depthCueIntS = depthCueInt;
160 interpolateS = interpolate;
161 allTimePointsS = allTimePoints;

Callers 1

runMethod · 0.95

Calls 15

isThresholdMethod · 0.95
getMinThresholdMethod · 0.95
getMaxThresholdMethod · 0.95
addChoiceMethod · 0.95
addNumericFieldMethod · 0.95
getUnitsMethod · 0.95
addCheckboxMethod · 0.95
addHelpMethod · 0.95
showDialogMethod · 0.95
wasCanceledMethod · 0.95
getNextChoiceIndexMethod · 0.95
getNextNumberMethod · 0.95

Tested by

no test coverage detected