Skip to content

Commit

Permalink
2023.11.08 (1.54h16; Cached virtual stacks)
Browse files Browse the repository at this point in the history
  • Loading branch information
rasband committed Dec 8, 2023
1 parent 4fd0abf commit 6f5f96f
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 18 deletions.
2 changes: 1 addition & 1 deletion ij/ImageJ.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public class ImageJ extends Frame implements ActionListener,

/** Plugins should call IJ.getVersion() or IJ.getFullVersion() to get the version string. */
public static final String VERSION = "1.54h";
public static final String BUILD = "10";
public static final String BUILD = "16";
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
23 changes: 12 additions & 11 deletions ij/ImageListenerAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,19 @@
*/
public class ImageListenerAdapter implements ImageListener {

@Override
public void imageOpened(ImagePlus imp) {
}
@Override
public void imageOpened(ImagePlus imp) {
}

@Override
public void imageClosed(ImagePlus imp) {
}
@Override
public void imageClosed(ImagePlus imp) {
}

@Override
public void imageUpdated(ImagePlus imp) {
}
@Override
public void imageUpdated(ImagePlus imp) {
}

public void imageSaved(ImagePlus imp) {
}

public void imageSaved(ImagePlus imp) {
}
}
9 changes: 7 additions & 2 deletions ij/ImagePlus.java
Original file line number Diff line number Diff line change
Expand Up @@ -757,9 +757,12 @@ public void setProcessor(String title, ImageProcessor ip) {
if (getStackSize()>1) {
if (ip.getWidth()!=width || ip.getHeight()!=height)
throw new IllegalArgumentException("Wrong dimensions for this stack");
int ipBitDepth = ip.getBitDepth();
int stackBitDepth = stack!=null?stack.getBitDepth():0;
if (stackBitDepth>0 && getBitDepth()!=stackBitDepth)
throw new IllegalArgumentException("Wrong type for this stack");
if (ipBitDepth>0 && stackBitDepth>0 && ipBitDepth!=stackBitDepth) {
String info = " \nsize="+getStackSize()+", ipBitDepth="+ipBitDepth+", stackBitDepth="+stackBitDepth;
throw new IllegalArgumentException("Wrong type for this stack"+info);
}
} else {
setStackNull();
setCurrentSlice(1);
Expand Down Expand Up @@ -841,6 +844,8 @@ else if (nScrollbars==0 && newStackSize>1)
boolean resetCurrentSlice = currentSlice>newStackSize;
if (resetCurrentSlice) setCurrentSlice(newStackSize);
ImageProcessor ip = newStack.getProcessor(currentSlice);
if (newStack.isVirtual()) // work around bug with virtual stacks that cache pixel data
ip = ip.duplicate();
boolean dimensionsChanged = width>0 && height>0 && (width!=ip.getWidth()||height!=ip.getHeight());
if (this.stack==null)
newStack.viewers(+1);
Expand Down
4 changes: 3 additions & 1 deletion ij/plugin/filter/LutViewer.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
import java.awt.image.*;
import java.util.ArrayList;

/** Displays the active image's look-up table. */
/** Displays the active image's look-up table.
* Implements the Image/Color/Show LUT command.
*/
public class LutViewer implements PlugInFilter {
private double guiScale = Prefs.getGuiScale();
private ImagePlus imp;
Expand Down
3 changes: 1 addition & 2 deletions ij/plugin/frame/ColorThresholder.java
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,6 @@ public void actionPerformed(ActionEvent e) {
if (imp==null) return;
if (b==originalB) {
reset(imp);
imp.setProperty("OriginalImage", null);
filteredB.setEnabled(true);
} else if (b==filteredB) {
reset(imp);
Expand Down Expand Up @@ -1252,9 +1251,9 @@ void applyStack() {

// Restores the original pixel data
void reset(ImagePlus imp) {
if (IJ.debugMode) IJ.log("ColorThresholder.reset");
ImageProcessor ip = imp.getProcessor();
ImagePlus originalImage = (ImagePlus)imp.getProperty("OriginalImage");
if (IJ.debugMode) IJ.log("ColorThresholder.reset: "+originalImage+" "+imp);
if (originalImage==null) {
originalImage = imp.createImagePlus();
originalImage.setTitle(imp.getTitle()+" (Original)");
Expand Down
20 changes: 19 additions & 1 deletion release-notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,39 @@
</head>
<body>

<li> <u>1.54h9 02 December 2023</u>
<li> <u>1.54h16 08 December 2023</u>
<ul>
<li> Thanks to Michael Schmid, improved the fidelity of
the RGB to indexed color conversion done by
<i>Image&gt;Type&gt;8-bit Color</i> command.
<li> Thanks to Michael Ellis, added the ImageListenerAdapter
class, which supports notification when an ImagePlus
is saved.
<li> Thanks to 'mandamanta', a warning is displayed in the "Log"
window if no particles are detected by the particle analyzer
when its running in batch mode.
<li> Thanks to Michael Schmid, the Plot.update() macro function
now works for plots that are not under construction.
<li> Thanks to Stein Rorvik, fixed bug where use of a modifier key
in the text editor caused isKeyDown() calls to be stuck
returning 'true' for that modifier.
<li> Thanks to 'IztokD', fixed bugs with the Plot.getValues() macro
functio not working in batch mode.
<li> Thanks to 'Fijipuff', fixed bug with making montages of multi-channel
COMPOSITE mode images.
<li> Thanks to Michael Schmid, fixed exceptions that occurred
with Plot.addLabel() and with the <i>Image&gt;Color&gt;Show LUT</i>
command.
<li> Thanks to Michael Schmid, fixed an exception that occurred
with Plot.addLabel().
<li> Thanks to Michael Schmid, fixed several
<i>Image&gt;Color&gt;Show LUT</i>
bugs.
<li> Thanks to Michael Schmid, fixed bug with virtual stacks
that cache pixel data.
<li> Thanks to Rodrigo Goncalves, fixed bug that caused the
Color Thresholder's "Original" button to not work as
expected.
<li> Thanks to Nick Condon, fixed a 1.53 regression that made the
Plot.getValues() macro function slower.
<li> Thanks to Stein Rorvik, fixed a 1.54e regression with the
Expand Down

0 comments on commit 6f5f96f

Please sign in to comment.