(String title, int width, int height, int nSlices, int bitDepth, int options)
| 381 | } |
| 382 | |
| 383 | public static ImagePlus createImage(String title, int width, int height, int nSlices, int bitDepth, int options) { |
| 384 | ImagePlus imp = null; |
| 385 | switch (bitDepth) { |
| 386 | case 8: imp = createByteImage(title, width, height, nSlices, options); break; |
| 387 | case 16: imp = createShortImage(title, width, height, nSlices, options); break; |
| 388 | case 32: imp = createFloatImage(title, width, height, nSlices, options); break; |
| 389 | case 24: |
| 390 | if ((options&SIGNED_INT)!=0) |
| 391 | imp = createIntImage(title, width, height, nSlices, options); |
| 392 | else |
| 393 | imp = createRGBImage(title, width, height, nSlices, options); |
| 394 | break; |
| 395 | default: throw new IllegalArgumentException("Invalid bitDepth: "+bitDepth); |
| 396 | } |
| 397 | return imp; |
| 398 | } |
| 399 | |
| 400 | boolean showDialog() { |
| 401 | if (staticType<GRAY8|| staticType>RGB) |
no test coverage detected