Skip to content

Commit

Permalink
2014.08.27 (1.49h1)
Browse files Browse the repository at this point in the history
  • Loading branch information
rasband committed Aug 27, 2014
1 parent 3f13a9f commit 3185b44
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 29 deletions.
4 changes: 2 additions & 2 deletions ij/ImageJ.java
Expand Up @@ -77,8 +77,8 @@ public class ImageJ extends Frame implements ActionListener,
MouseListener, KeyListener, WindowListener, ItemListener, Runnable {

/** Plugins should call IJ.getVersion() or IJ.getFullVersion() to get the version string. */
public static final String VERSION = "1.49g";
public static final String BUILD = "";
public static final String VERSION = "1.49h";
public static final String BUILD = "1";
public static Color backgroundColor = new Color(237,237,237);
/** SansSerif, 12-point, plain font. */
public static final Font SansSerif12 = new Font("SansSerif", Font.PLAIN, 12);
Expand Down
14 changes: 5 additions & 9 deletions ij/Menus.java
Expand Up @@ -52,7 +52,6 @@ public class Menus {
private static PopupMenu popup;

private static ImageJ ij;
private static boolean isFiji;
private static Applet applet;
private Hashtable demoImagesTable = new Hashtable();
private static String ImageJPath, pluginsPath, macrosPath;
Expand Down Expand Up @@ -86,7 +85,6 @@ public class Menus {
Menus(ImageJ ijInstance, Applet appletInstance) {
ij = ijInstance;
String title = ij!=null?ij.getTitle():null;
isFiji = title!=null && title.contains("Fiji");
applet = appletInstance;
instance = this;
}
Expand All @@ -107,10 +105,8 @@ String addMenuBar() {
addPlugInItem(file, "Open...", "ij.plugin.Commands(\"open\")", KeyEvent.VK_O, false);
addPlugInItem(file, "Open Next", "ij.plugin.NextImageOpener", KeyEvent.VK_O, true);
Menu openSamples = getMenu("File>Open Samples", true);
if (!isFiji) {
openSamples.addSeparator();
addPlugInItem(openSamples, "Cache Sample Images ", "ij.plugin.URLOpener(\"cache\")", 0, false);
}
openSamples.addSeparator();
addPlugInItem(openSamples, "Cache Sample Images ", "ij.plugin.URLOpener(\"cache\")", 0, false);
addOpenRecentSubMenu(file);
Menu importMenu = getMenu("File>Import", true);
file.addSeparator();
Expand Down Expand Up @@ -349,7 +345,7 @@ static void addLuts(Menu submenu) {
String name = list[i];
if (name.endsWith(".lut")) {
name = name.substring(0,name.length()-4);
if (!isFiji && name.contains("_") && !name.contains(" "))
if (name.contains("_") && !name.contains(" "))
name = name.replace("_", " ");
MenuItem item = new MenuItem(name);
submenu.add(item);
Expand Down Expand Up @@ -992,8 +988,8 @@ private static void installSubdirectorMacros(File f2, String dir) {
}

private static boolean validMacroName(String name, boolean hasUnderscore) {
return (hasUnderscore&&name.endsWith(".txt"))||name.endsWith(".ijm")||name.endsWith(".js")
||(name.endsWith(".bsh")&&!isFiji)||(name.endsWith(".py")&&!isFiji);
return (hasUnderscore&&name.endsWith(".txt")) || name.endsWith(".ijm")
|| name.endsWith(".js") || name.endsWith(".bsh") || name.endsWith(".py");
}

/** Installs a plugin in the Plugins menu using the class name,
Expand Down
19 changes: 12 additions & 7 deletions ij/plugin/ZProjector.java
Expand Up @@ -130,14 +130,15 @@ public void run(String arg) {

// Build control dialog
GenericDialog gd = buildControlDialog(startSlice,stopSlice);
gd.setSmartRecording(true);
gd.showDialog();
if (gd.wasCanceled()) return;

if (!imp.lock()) return; // exit if in use
long tstart = System.currentTimeMillis();
gd.setSmartRecording(true);
setStartSlice((int)gd.getNextNumber());
setStopSlice((int)gd.getNextNumber());
gd.setSmartRecording(false);
method = gd.getNextChoiceIndex();
Prefs.set(METHOD_KEY, method);
if (isHyperstack) {
Expand Down Expand Up @@ -251,27 +252,31 @@ public void doProjection() {
// more general use of ImageProcessor's getPixelValue and
// putPixel methods.
int ptype;
if(stack.getProcessor(1) instanceof ByteProcessor) ptype = BYTE_TYPE;
else if(stack.getProcessor(1) instanceof ShortProcessor) ptype = SHORT_TYPE;
else if(stack.getProcessor(1) instanceof FloatProcessor) ptype = FLOAT_TYPE;
if (stack.getProcessor(1) instanceof ByteProcessor) ptype = BYTE_TYPE;
else if (stack.getProcessor(1) instanceof ShortProcessor) ptype = SHORT_TYPE;
else if (stack.getProcessor(1) instanceof FloatProcessor) ptype = FLOAT_TYPE;
else {
IJ.error("Z Project", "Non-RGB stack required");
return;
}

// Do the projection.
for(int n=startSlice; n<=stopSlice; n+=increment) {
// Do the projection
int sliceCount = 0;
for (int n=startSlice; n<=stopSlice; n+=increment) {
if (!isHyperstack) {
IJ.showStatus("ZProjection " + color +": " + n + "/" + stopSlice);
IJ.showProgress(n-startSlice, stopSlice-startSlice);
}
projectSlice(stack.getPixels(n), rayFunc, ptype);
sliceCount++;
}

// Finish up projection.
if (method==SUM_METHOD) {
if (imp.getCalibration().isSigned16Bit())
fp.subtract(sliceCount*32768.0);
fp.resetMinAndMax();
projImage = new ImagePlus(makeTitle(),fp);
projImage = new ImagePlus(makeTitle(), fp);
} else if (method==SD_METHOD) {
rayFunc.postProcess();
fp.resetMinAndMax();
Expand Down
2 changes: 1 addition & 1 deletion ij/plugin/filter/AVI_Writer.java
Expand Up @@ -97,8 +97,8 @@ private boolean showDialog(ImagePlus imp) {
return false;
gd.setSmartRecording(compressionIndex==2);
compressionIndex = gd.getNextChoiceIndex();
gd.setSmartRecording(false);
//jpegQuality = (int)gd.getNextNumber();
gd.setSmartRecording(fps==7.0);
fps = gd.getNextNumber();
if (fps<=0.5) fps = 0.5;
//if (fps>60.0) fps = 60.0;
Expand Down
13 changes: 3 additions & 10 deletions release-notes.html
Expand Up @@ -5,17 +5,10 @@
</head>
<body>

<li> <u>1.49g 25 August 2014</u>
<li> <u>1.49h 27 August 2014</u>
<ul>
<li> Thanks to Jon Harman, pinch to zoom works on Windows 8 tablets and touch screen laptops.
<li> Thanks to Sean Smith, mouse wheel scrolling is faster on Windows.
<li> Improved script-mode recording of commands in the <i>Edit&gt;Selection</i> submenu.
<li> Thanks to Neil Fazel, fixed a bug that caused the <i>Analyze&gt;Tools&gt;Save XY Coordinates</i>
command to not work with NaN backgrounds.
<li> Thanks to Richard Pastrick, fixed a bug in the TiffDecoder that caused it to
sometimes incorrectly read the XResolution and YResolution tags.
<li> Fixed a 1.49f regression that caused <i>Image&gt;Overlay&gt;Flatten</i> that
to fail with composite images.
<li> Thanks to Pedro Pepe, fixed a bug that caused the "Sum Method" of
<i>Image&gt;Stacks&gt;Z Project</i> to not work correctly with signed 16-bit stacks.
</ul>

<a href="http://imagej.nih.gov/ij">Home</a>
Expand Down

0 comments on commit 3185b44

Please sign in to comment.