Skip to content

Commit

Permalink
2017.02.25 (1.51k21)
Browse files Browse the repository at this point in the history
  • Loading branch information
rasband committed Feb 26, 2017
1 parent 8aca41c commit 1ada2f5
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 19 deletions.
2 changes: 1 addition & 1 deletion ij/IJ.java
Expand Up @@ -562,7 +562,7 @@ public static void outOfMemory(String name) {
Undo.reset();
System.gc();
lastErrorMessage = "out of memory";
String tot = Runtime.getRuntime().totalMemory()/1048576L+"MB";
String tot = Runtime.getRuntime().maxMemory()/1048576L+"MB";
if (!memMessageDisplayed)
log(">>>>>>>>>>>>>>>>>>>>>>>>>>>");
log("<Out of memory>");
Expand Down
2 changes: 1 addition & 1 deletion ij/ImageJ.java
Expand Up @@ -80,7 +80,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.51k";
public static final String BUILD = "19";
public static final String BUILD = "21";
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
20 changes: 13 additions & 7 deletions ij/ImagePlus.java
Expand Up @@ -96,24 +96,24 @@ public class ImagePlus implements ImageObserver, Measurements, Cloneable {

/** Constructs an uninitialized ImagePlus. */
public ImagePlus() {
ID = --currentID;
title="null";
title = (this instanceof CompositeImage)?"composite":"null";
setID();
}

/** Constructs an ImagePlus from an Image or BufferedImage. The first
argument will be used as the title of the window that displays the image.
Throws an IllegalStateException if an error occurs while loading the image. */
public ImagePlus(String title, Image img) {
this.title = title;
ID = --currentID;
if (img!=null)
setImage(img);
setID();
}

/** Constructs an ImagePlus from an ImageProcessor. */
public ImagePlus(String title, ImageProcessor ip) {
setProcessor(title, ip);
ID = --currentID;
setID();
}

/** Constructs an ImagePlus from a TIFF, BMP, DICOM, FITS,
Expand All @@ -140,16 +140,21 @@ public ImagePlus(String pathOrURL) {
setRoi(imp.getRoi());
if (isURL)
this.url = pathOrURL;
ID = --currentID;
setID();
}
}

/** Constructs an ImagePlus from a stack. */
public ImagePlus(String title, ImageStack stack) {
setStack(title, stack);
ID = --currentID;
setID();
}

private void setID() {
ID = --currentID;
//IJ.log("New "+this);
}

/** Locks the image so other threads can test to see if it
is in use. Returns true if the image was successfully locked.
Beeps, displays a message in the status bar, and returns
Expand Down Expand Up @@ -2068,6 +2073,7 @@ public void copyScale(ImagePlus imp) {

/** Copies attributes (name, ID, calibration, path) of the specified image to this image. */
public void copyAttributes(ImagePlus imp) {
if (IJ.debugMode) IJ.log("copyAttributes: "+imp.getID()+" "+this.getID()+" "+imp+" "+this);
if (imp==null || imp.getWindow()!=null)
throw new IllegalArgumentException("Souce image is null or displayed");
ID = imp.getID();
Expand Down Expand Up @@ -2692,7 +2698,7 @@ public synchronized Object clone() {
}

public String toString() {
return "img["+getTitle()+" ("+width+"x"+height+"x"+getNChannels()+"x"+getNSlices()+"x"+getNFrames()+")]";
return "img[\""+getTitle()+"\" ("+getID()+"), "+getBitDepth()+"-bit, "+width+"x"+height+"x"+getNChannels()+"x"+getNSlices()+"x"+getNFrames()+"]";
}

public void setIJMenuBar(boolean b) {
Expand Down
2 changes: 1 addition & 1 deletion ij/plugin/HyperStackConverter.java
Expand Up @@ -86,7 +86,7 @@ else if (mode.equalsIgnoreCase("grayscale"))
return imp2;
}

/** Displays the current stack in a HyperStack window. Based on the
/** Displays the specified stack in a HyperStack window. Based on the
Stack_to_Image5D class in Joachim Walter's Image5D plugin. */
void convertStackToHS(ImagePlus imp) {
int nChannels = imp.getNChannels();
Expand Down
7 changes: 1 addition & 6 deletions ij/plugin/Projector.java
Expand Up @@ -201,7 +201,6 @@ private void doHyperstackProjections(ImagePlus imp) {
if ((f==0||!allTimePoints)&& c==0) {
buildImp = projImpD;
buildImp.setTitle("BuildStack");
//buildImp.show();
} else {
Concatenator concat = new Concatenator();
buildImp = concat.concatenate(buildImp, projImpD, false);
Expand All @@ -215,9 +214,7 @@ private void doHyperstackProjections(ImagePlus imp) {
finalSlices = 1;
}
if (imp.getNChannels()>1)
IJ.run( buildImp,
"Stack to Hyperstack...", "order=xyztc channels=" + finalChannels + " slices=" + finalSlices + " frames=" + finalFrames + " display=Composite");
//buildImp = WindowManager.getCurrentImage();
buildImp = HyperStackConverter.toHyperStack(buildImp, finalChannels, finalSlices, finalFrames, "xyztc", "composite");
if (imp.isComposite()) {
CompositeImage buildImp2 = new CompositeImage(buildImp, 0);
((CompositeImage)buildImp2).copyLuts(imp);
Expand All @@ -226,8 +223,6 @@ private void doHyperstackProjections(ImagePlus imp) {
}
buildImp.setTitle("Projections of "+imp.getShortTitle());
buildImp.show();
if (WindowManager.getImage("Concatenated Stacks") != null)
WindowManager.getImage("Concatenated Stacks").hide();
}

private void doRGBProjections(ImagePlus imp) {
Expand Down
2 changes: 1 addition & 1 deletion ij/plugin/frame/Editor.java
Expand Up @@ -40,7 +40,7 @@ public class Editor extends PlugInFrame implements ActionListener, ItemListener,

public static final int MAX_SIZE=28000, XINC=10, YINC=18;
public static final int MONOSPACED=1, MENU_BAR=2;
public static final int MACROS_MENU_ITEMS = 12;
public static final int MACROS_MENU_ITEMS = 13;
static final String FONT_SIZE = "editor.font.size";
static final String FONT_MONO= "editor.font.mono";
static final String CASE_SENSITIVE= "editor.case-sensitive";
Expand Down
6 changes: 4 additions & 2 deletions release-notes.html
Expand Up @@ -5,7 +5,7 @@
</head>
<body>

<li> <u>1.51k 24 February 2017</u>
<li> <u>1.51k 25 February 2017</u>
<ul>
<li> Added the <i>Plugins&gt;Utilities&gt;Capture Delayed</i> command.
<li> Added this note to the <i>Help&gt;Examples&gt;Macro&gt;Sphere</i>
Expand Down Expand Up @@ -33,7 +33,9 @@
"text-window" had been saved and re-opened.
<li> Thanks to Puifai Santisakultarm, fixed a bug that caused the
IJ.run(imp,"RGB Color","") method to not work as expected with
images that are not displayed.
non-displayed images.
<li> Thanks to Michael Cammer, fixed bug that caused the run("3D Project...",options)
macro function to not work reliably with hyperstacks.
</ul>

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

0 comments on commit 1ada2f5

Please sign in to comment.