Package gov.nih.mipav.model.file
Class MetadataExtractor.JpegDescriptor
- java.lang.Object
-
- gov.nih.mipav.model.file.MetadataExtractor.TagDescriptor<MetadataExtractor.JpegDirectory>
-
- gov.nih.mipav.model.file.MetadataExtractor.JpegDescriptor
-
- Enclosing class:
- MetadataExtractor
public class MetadataExtractor.JpegDescriptor extends MetadataExtractor.TagDescriptor<MetadataExtractor.JpegDirectory>
Provides human-readable string versions of the tags stored in a JpegDirectory. Thanks to Darrell Silver (www.darrellsilver.com) for the initial version of this class.- Author:
- Drew Noakes https://drewnoakes.com
-
-
Field Summary
Fields Modifier and Type Field Description static intTAG_COMPONENT_DATA_1the first of a possible 4 color components.static intTAG_COMPONENT_DATA_2the second of a possible 4 color components.static intTAG_COMPONENT_DATA_3the third of a possible 4 color components.static intTAG_COMPONENT_DATA_4the fourth of a possible 4 color components.static intTAG_COMPRESSION_TYPEstatic intTAG_DATA_PRECISIONThis is in bits/sample, usually 8 (12 and 16 not supported by most software).static intTAG_IMAGE_HEIGHTThe image's height.static intTAG_IMAGE_WIDTHThe image's width.-
Fields inherited from class gov.nih.mipav.model.file.MetadataExtractor.TagDescriptor
_directory
-
-
Constructor Summary
Constructors Constructor Description JpegDescriptor(MetadataExtractor.JpegDirectory directory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetComponentDataDescription(int componentNumber)java.lang.StringgetDataPrecisionDescription()java.lang.StringgetDescription(int tagType)Returns a descriptive value of the specified tag for this image.java.lang.StringgetImageCompressionTypeDescription()java.lang.StringgetImageHeightDescription()java.lang.StringgetImageWidthDescription()-
Methods inherited from class gov.nih.mipav.model.file.MetadataExtractor.TagDescriptor
convertBytesToVersionString, get7BitStringFromBytes, getBitFlagDescription, getByteLengthDescription, getDecimalRational, getEncodedTextDescription, getEpochTimeDescription, getFocalLengthDescription, getFormattedFloat, getFormattedInt, getFormattedString, getFStopDescription, getIndexedDescription, getIndexedDescription, getLensSpecificationDescription, getOrientationDescription, getRationalOrDoubleString, getShutterSpeedDescription, getSimpleRational, getStringFromBytes, getVersionBytesDescription
-
-
-
-
Field Detail
-
TAG_COMPRESSION_TYPE
public static final int TAG_COMPRESSION_TYPE
- See Also:
- Constant Field Values
-
TAG_DATA_PRECISION
public static final int TAG_DATA_PRECISION
This is in bits/sample, usually 8 (12 and 16 not supported by most software).- See Also:
- Constant Field Values
-
TAG_IMAGE_HEIGHT
public static final int TAG_IMAGE_HEIGHT
The image's height. Necessary for decoding the image, so it should always be there.- See Also:
- Constant Field Values
-
TAG_IMAGE_WIDTH
public static final int TAG_IMAGE_WIDTH
The image's width. Necessary for decoding the image, so it should always be there.- See Also:
- Constant Field Values
-
TAG_COMPONENT_DATA_1
public static final int TAG_COMPONENT_DATA_1
the first of a possible 4 color components. Number of components specified in TAG_NUMBER_OF_COMPONENTS.- See Also:
- Constant Field Values
-
TAG_COMPONENT_DATA_2
public static final int TAG_COMPONENT_DATA_2
the second of a possible 4 color components. Number of components specified in TAG_NUMBER_OF_COMPONENTS.- See Also:
- Constant Field Values
-
TAG_COMPONENT_DATA_3
public static final int TAG_COMPONENT_DATA_3
the third of a possible 4 color components. Number of components specified in TAG_NUMBER_OF_COMPONENTS.- See Also:
- Constant Field Values
-
TAG_COMPONENT_DATA_4
public static final int TAG_COMPONENT_DATA_4
the fourth of a possible 4 color components. Number of components specified in TAG_NUMBER_OF_COMPONENTS.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JpegDescriptor
public JpegDescriptor(MetadataExtractor.JpegDirectory directory)
-
-
Method Detail
-
getDescription
public java.lang.String getDescription(int tagType)
Description copied from class:MetadataExtractor.TagDescriptorReturns a descriptive value of the specified tag for this image. Where possible, known values will be substituted here in place of the raw tokens actually kept in the metadata segment. If no substitution is available, the value provided bygetString(tagType)will be returned.- Overrides:
getDescriptionin classMetadataExtractor.TagDescriptor<MetadataExtractor.JpegDirectory>- Parameters:
tagType- the tag to find a description for- Returns:
- a description of the image's value for the specified tag, or
nullif the tag hasn't been defined.
-
getImageCompressionTypeDescription
public java.lang.String getImageCompressionTypeDescription()
-
getImageWidthDescription
public java.lang.String getImageWidthDescription()
-
getImageHeightDescription
public java.lang.String getImageHeightDescription()
-
getDataPrecisionDescription
public java.lang.String getDataPrecisionDescription()
-
getComponentDataDescription
public java.lang.String getComponentDataDescription(int componentNumber)
-
-