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

Method setProp

ij/src/main/java/ij/ImagePlus.java:1635–1647  ·  view source on GitHub ↗

Adds a key-value pair to this image's string properties. The key-value pair is removed if 'value' is null. The properties persist if the image is saved in TIFF format. Add a "HideInfo" property (e.g. set("HideInfo","true")) to prevent the properties from being displayed by the Image/Show Info comman

(String key, String value)

Source from the content-addressed store, hash-verified

1633 * Image/Show Info command.
1634 */
1635 public void setProp(String key, String value) {
1636 if (key==null)
1637 return;
1638 if (imageProperties==null)
1639 imageProperties = new Properties();
1640 if (value==null || value.length()==0)
1641 imageProperties.remove(key);
1642 else {
1643 imageProperties.setProperty(key, value);
1644 if (key.equals("CompositeProjection"))
1645 Channels.updateChannels();
1646 }
1647 }
1648
1649 /** Saves a persistent numeric propery. The property is
1650 * removed if 'value' is NaN.

Callers 15

setStackNullMethod · 0.95
setPropertiesMethod · 0.95
doPropertyMethod · 0.95
runMethod · 0.95
setSliceLabelMethod · 0.95
removeStackLabelsMethod · 0.95
runMethod · 0.95
cropMethod · 0.95
runMethod · 0.95
runMethod · 0.95
openMethod · 0.95
saveLUTNameMethod · 0.80

Calls 6

updateChannelsMethod · 0.95
substringMethod · 0.80
lengthMethod · 0.65
removeMethod · 0.45
setPropertyMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected