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)
| 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. |
no test coverage detected