Class FileInfoDicom
- java.lang.Object
-
- gov.nih.mipav.model.structures.ModelSerialCloneable
-
- gov.nih.mipav.model.file.FileInfoBase
-
- gov.nih.mipav.model.file.FileInfoDicom
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class FileInfoDicom extends FileInfoBase
This class contains DICOM header information. It uses a table to store all the information about the tags. The FileDicomTagTable listing all known tags with empty values is in DicomDictionary. Also stored here is the offset of the image, the image number, the resolutions, some pixel data, the bytes allocated, and the dimensions of the image.
This file also contains a table used for displaying the tag information. There is an option to display just the standard tags or both the standard and the private tags.
- Version:
- 1.0 Aug 1, 1999
- See Also:
FileDicom
,FileDicomTag
,FileDicomTagTable
,JDialogFileInfoDICOM
, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
FileInfoDicom.LengthStorageUnit
This class is a basic storage unit for a primitive integer variable.static class
FileInfoDicom.VRtype
-
Nested classes/interfaces inherited from class gov.nih.mipav.model.file.FileInfoBase
FileInfoBase.AxisOrientation, FileInfoBase.ImageOrientation, FileInfoBase.Modality, FileInfoBase.Unit, FileInfoBase.UnitType
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String[]
anonymizeTagIDs
these are the DICOM tag ID numbers corresponding to the tags which are anonymized.short
bitsAllocated
Bits allocated per pixel.short
bitsStored
Bits stored per pixel>short
bytesPerPixel
Number of bytes per pixel.boolean
containsDICM
True if the DICOM file has the ID DICM at beginning at file pointer 128.int
displayType
Data type.short
highBit
int
instanceNumber
DICOM instance number.boolean
isCurrentTagSQ
Whether the tag currently being processed and read in is a sequence tag.private boolean
isEnhancedDicom
whether it is enhanced dicom or notprivate ModelLUT
lut
LUT for pre-processing of dicom fileboolean
multiFrame
True indicates image has multiple image planes in a single file.boolean
olderVersion
True is image format < DICOM 3.0.java.lang.String
orientation
Orientation - SAGITTAL, CORONAL, AXIAL.int
originalDataType
java.lang.String
photometricInterp
Type of image - color, monochrome etc.java.lang.Short
pixelPaddingValue
Pixel Padding Value (0028, 0120).short
pixelRepresentation
DICOM tag (0028, 0103) -1 = undefined 0 = unsigned 1 = signedshort
planarConfig
0 = RGB, RGB, 1 = R R R, G G G, B B B.private int
RLETAMARencapsulatedOffset
private static long
serialVersionUID
Use serialVersionUID for interoperability.static int
SIGNED_PIXEL_REP
(0028,0103) Pixel Representationsfloat
sliceLocation
DICOM slice location.private FileDicomTagTable
tagTable
Stores all the information about the DICOM tags.static int
UNDEFINED_PIXEL_REP
(0028,0103) Pixel Representationsstatic int
UNSIGNED_PIXEL_REP
(0028,0103) Pixel Representationsprivate FileInfoDicom.VRtype
vr_type
VR type can be IMPLICIT or EXPLICIT.float
xLocation
DICOM x coordianate of the slice location.float
yLocation
DICOM y coordianate of the slice location.float
zLocation
DICOM z coordianate of the slice location.-
Fields inherited from class gov.nih.mipav.model.file.FileInfoBase
ANGSTROMS, ANGSTROMS_STRING, AXIAL, axisOrientation, axisOrientationStr, BIOMAGNETIC_IMAGING, cameraMake, cameraModel, CENTIMETERS, CENTIMETERS_STRING, COLOR_FLOW_DOPPLER, COMPRESSION_BZIP2, COMPRESSION_GZIP, COMPRESSION_NONE, COMPRESSION_ZIP, COMPUTED_RADIOGRAPHY, COMPUTED_TOMOGRAPHY, conversionSpaceTimeUnits, CORONAL, DEGREES, DEGREES_STRING, DIAPHANOGRAPHY, DIGITAL_RADIOGRAPHY, DUPLEX_DOPPLER, ENDOSCOPY, exposureTime, EXTERNAL_CAMERA_PHOTOGRAPHY, FA, fileName, fileSuffix, FNumber, focalLength, focalLength35, GENERAL_MICROSCOPY, HARDCOPY, HOURS, HOURS_STRING, HZ, HZ_STRING, ICG, imageOrientation, INCHES, INCHES_STRING, INTRAORAL_RADIOGRAPHY, ISOSpeedRating, KILOMETERS, KILOMETERS_STRING, LASER_SURFACE_SCAN, MAGNETIC_RESONANCE, MAGNETIC_RESONANCE_ANGIOGRAPHY, MAGNETIC_RESONANCE_SPECTROSCOPY, MAMMOGRAPHY, METERS, METERS_STRING, MICROMETERS, MICROMETERS_STRING, MICROSEC, MICROSEC_STRING, MILES, MILES_STRING, MILLIMETERS, MILLIMETERS_STRING, MILLISEC, MILLISEC_STRING, MILS, MILS_STRING, MINUTES, MINUTES_STRING, modality, NANOMETERS, NANOMETERS_STRING, NANOSEC, NANOSEC_STRING, NUCLEAR_MEDICINE, ORI_A2P_TYPE, ORI_I2S_TYPE, ORI_L2R_TYPE, ORI_P2A_TYPE, ORI_R2L_TYPE, ORI_S2I_TYPE, ORI_UNKNOWN_TYPE, origin, OTHER, PANORAMIC_XRAY, POSITRON_EMISSION_TOMOGRAPHY, PPM, PPM_STRING, RADIO_FLUOROSCOPY, RADIOGRAPHIC_IMAGING, RADIOTHERAPY_DOSE, RADIOTHERAPY_IMAGE, RADIOTHERAPY_PLAN, RADIOTHERAPY_RECORD, RADIOTHERAPY_STRUCTURE_SET, RADS, RADS_STRING, RED_FREE, SAGITTAL, SECONDS, SECONDS_STRING, SINGLE_PHOTON_EMISSION_COMPUTED_TOMOGRAPHY, SLIDE_MICROSCOPY, sUnits, tagDescription, tagName, THERMOGRAPHY, TRANSFORM_ANOTHER_DATASET, TRANSFORM_MNI_152, TRANSFORM_SCANNER_ANATOMICAL, TRANSFORM_TALAIRACH_TOURNOUX, TRANSFORM_UNKNOWN, tUnits, ULTRASOUND, unitsOfMeasure, UNKNOWN_MEASURE, UNKNOWN_MODALITY, UNKNOWN_ORIENT, UNKNOWN_STRING, XRAY_ANGIOGRAPHY
-
-
Constructor Summary
Constructors Constructor Description FileInfoDicom(java.lang.String name, java.lang.String directory, int format)
DICOM file information constructor.FileInfoDicom(java.lang.String name, java.lang.String directory, int format, FileInfoDicom refInfo)
DICOM file information constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
anonymize(boolean[] list, boolean removeValue)
removes any and all personal information in the info that a doctor, patient, researcher may want to have deleted from the image, such as patient name or patient ID number--from this slice given by this fileInfoDicom.void
anonymizePublicSequenceTags(FileDicomKey[] keys, java.util.Vector<FileDicomSQItem> seqs, boolean removeValue)
Method to anonymize public tags not in the DICOM Supplement 55 that may appear in sequence tags.void
anonymizePublicTags(FileDicomKey[] keys, boolean removeValue)
Method to anonymize public tags that do not appear in the DICOM Supplement 55.void
anonymizeSequenceTags(boolean[] list, java.util.Vector<FileDicomSQItem> seqs, boolean removeValue)
Method to anonymize the tags found in the DICOM supplement 55 that may appear in sequence tags.private void
appendLengthTag(FileDicomTag tag, java.util.HashMap<java.lang.Integer,FileInfoDicom.LengthStorageUnit> lengthComp)
void
displayAboutInfo(JDialogBase dialog, TransMatrix matrix)
Super requires displayAboutInfo to be defined display of this class is held by JDialogFileInfoDICOM.void
finalize()
Prepares this class for cleanup.java.lang.Object
generateNewTagValue(java.lang.String key, boolean remove)
Generates a new version of a particular tag that is DICOM compatiblestatic java.lang.Object
generateNewTagValue(java.lang.String key, FileDicomTagTable tagTable, boolean remove)
Generates a new version of a particular tag in the given tag table with same length that is DICOM compatiblestatic java.lang.Object
generateNewTagValue(java.lang.String key, java.lang.String strValue)
Generates a new version of a particular tag in the standard DICOM tag table with same length that is DICOM compatiblestatic java.lang.Object
generateNewTagValue(java.lang.String key, java.lang.String strValue, FileDicomTagInfo.VR vr)
Generates a new version of a particular tag given an arbitrary value and returns a DICOM compatible resultstatic java.lang.Object
generateNewTagValue(java.lang.String key, java.lang.String strValue, FileDicomTagInfo.VR vr, boolean remove)
ModelLUT
getLUT()
returns the ModelLUT, if there, which might be specified by the0028,1201
,0028,1202
,0028,1203
tags.protected static int
getModalityFromDicomStr(java.lang.String value)
Returns the MIPAV modality constant for a given DICOM modality string.int
getOriginalDataType()
TransMatrix
getPatientOrientation()
This method extracts directional cosines from the DICOM image header (tag = "0020, 0037").int
getRLETAMARencapsulatedOffset()
FileDicomTagTable
getTagTable()
Returns a reference to the tag table for this dicom file info.FileInfoDicom.VRtype
getVr_type()
boolean
isEnhancedDicom()
boolean
isMultiFrame()
Accessor for the status of this dicom info.java.lang.String[]
parseTagValue(java.lang.String tagName)
Parse the string for Objects seperated by "\".void
removePrivateSequenceTags(FileDicomKey[] keys, java.util.Vector<FileDicomSQItem> seqs)
Method to anonymize private tags that may appear in sequence tags.void
removePrivateSequenceTagsWhite(FileDicomKey[] keys, java.util.Vector<FileDicomSQItem> seqs)
void
removePrivateTags(FileDicomKey[] keys)
Method to remove private tags from the file.void
removePrivateTagsWhite(FileDicomKey[] keys)
void
removeStampSecondaryCapture()
In anonymization cases it may be necessary to hide the fact that MIPAV has processed this image (to remove any NIH affiliation).protected void
setInfoFromTag(FileDicomTag tag)
Sets fields in this file info based on a given tag's key and value.void
setInfoFromTags()
Public method for populating ModelImage data fields.private void
setInfoFromTags(FileDicomTagTable tagTable, boolean insideSequenceTag)
After the tag table is filled, check for a number of tags to set up some fields in this file info object.void
setIsEnhancedDicom(boolean isEnhancedDicom)
protected void
setModalityFromDicomStr(java.lang.String value)
Uses the DICOM tag value to set the Image modality field.void
setMultiFrame(boolean multiFrame)
Sets whether the DICOM image is a multiFrame image.void
setOriginalDataType(int originalDataType)
void
setRLETAMARencapsulatedOffset(int offset)
void
setSecondaryCaptureTags(boolean isMultiFrame, int dataType)
Changes a few dicom tags associated with a secondary capture image (marking it as having been created with mipav).void
setTagTable(FileDicomTagTable tagTable)
void
setVr_type(FileInfoDicom.VRtype vr_type)
private void
updateLengthTags(java.util.HashMap<java.lang.Integer,FileInfoDicom.LengthStorageUnit> lengthComp)
-
Methods inherited from class gov.nih.mipav.model.file.FileInfoBase
copyCoreInfo, copyCoreInfo, displayAboutInfo, displayPrimaryInfo, getAboutInfo, getAllSameDimUnits, getAreaUnitsOfMeasureStr, getAxisDirection, getAxisOrientation, getAxisOrientation, getAxisOrientationFromStr, getAxisOrientationStr, getCameraMake, getCameraModel, getCompressionType, getDataType, getDataTypeFromStr, getEndianess, getEndianessFromStr, getExposureTime, getExtents, getFileDirectory, getFileFormat, getFileName, getFileSuffix, getFNumber, getFocalLength, getFocalLength35, getImageOrientation, getImageOrientationFromStr, getImageOrientationStr, getIs2_5D, getISOSpeedRating, getLPSOrigin, getMax, getMaxB, getMaxG, getMaxR, getMin, getMinB, getMinG, getMinR, getModality, getModalityFromStr, getModalityStr, getModalityStr, getMultiFile, getNumOfBytesPerPixel, getOffset, getOrigin, getOrigin, getOriginalEndianess, getOriginAtSlice, getPhotometric, getPixelPadValue, getPrimaryInfo, getRescaleIntercept, getRescaleSlope, getResolution, getResolutions, getSize, getSliceThickness, getUnitsOfMeasure, getUnitsOfMeasure, getUnitsOfMeasureAbbrevStr, getUnitsOfMeasureAbbrevStr, getUnitsOfMeasureFromStr, getUnitsOfMeasureStr, getUnitsOfMeasureStr, getVolumeUnitsOfMeasureStr, isDicomOrdered, oppositeOrient, sameAxis, setAxisOrientation, setAxisOrientation, setCameraMake, setCameraModel, setCompressionType, setDataType, setEndianess, setExposureTime, setExtents, setExtents, setFileDirectory, setFileFormat, setFileName, setFileSuffix, setFNumber, setFocalLength, setFocalLength35, setImageOrientation, setISOSpeedRating, setLUT, setMax, setMaxB, setMaxG, setMaxR, setMin, setMinB, setMinG, setMinR, setModality, setMultiFile, setOffset, setOrigin, setOrigin, setOriginalEndianess, setPhotometric, setPixelPadValue, setRescaleIntercept, setRescaleSlope, setResolutions, setResolutions, setSliceThickness, setTagDescription, setTagName, setUnitsOfMeasure, setUnitsOfMeasure, setUnitsOfMeasure, setUnitsOfMeasure, toString
-
Methods inherited from class gov.nih.mipav.model.structures.ModelSerialCloneable
clone, nativeClone
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
UNDEFINED_PIXEL_REP
public static final int UNDEFINED_PIXEL_REP
(0028,0103) Pixel Representations- See Also:
- Constant Field Values
-
UNSIGNED_PIXEL_REP
public static final int UNSIGNED_PIXEL_REP
(0028,0103) Pixel Representations- See Also:
- Constant Field Values
-
SIGNED_PIXEL_REP
public static final int SIGNED_PIXEL_REP
(0028,0103) Pixel Representations- See Also:
- Constant Field Values
-
RLETAMARencapsulatedOffset
private int RLETAMARencapsulatedOffset
-
anonymizeTagIDs
public static final java.lang.String[] anonymizeTagIDs
these are the DICOM tag ID numbers corresponding to the tags which are anonymized. They are kept here for simplicity of updating (when it is decided that other tags are must be anonymized) and to the advantage of calling objects.
-
bitsAllocated
public short bitsAllocated
Bits allocated per pixel.
-
bitsStored
public short bitsStored
Bits stored per pixel>
-
highBit
public short highBit
-
bytesPerPixel
public short bytesPerPixel
Number of bytes per pixel.
-
originalDataType
public int originalDataType
-
containsDICM
public boolean containsDICM
True if the DICOM file has the ID DICM at beginning at file pointer 128.
-
displayType
public int displayType
Data type.
-
instanceNumber
public int instanceNumber
DICOM instance number.
-
isCurrentTagSQ
public boolean isCurrentTagSQ
Whether the tag currently being processed and read in is a sequence tag.
-
multiFrame
public boolean multiFrame
True indicates image has multiple image planes in a single file.
-
olderVersion
public boolean olderVersion
True is image format < DICOM 3.0.
-
orientation
public java.lang.String orientation
Orientation - SAGITTAL, CORONAL, AXIAL.
-
photometricInterp
public java.lang.String photometricInterp
Type of image - color, monochrome etc.
-
pixelPaddingValue
public java.lang.Short pixelPaddingValue
Pixel Padding Value (0028, 0120). Value of pixels added to non-rectangular image to pad to rectangular format.
-
pixelRepresentation
public short pixelRepresentation
DICOM tag (0028, 0103) -1 = undefined 0 = unsigned 1 = signed
-
planarConfig
public short planarConfig
0 = RGB, RGB, 1 = R R R, G G G, B B B.
-
sliceLocation
public float sliceLocation
DICOM slice location.
-
vr_type
private FileInfoDicom.VRtype vr_type
VR type can be IMPLICIT or EXPLICIT.
-
xLocation
public float xLocation
DICOM x coordianate of the slice location.
-
yLocation
public float yLocation
DICOM y coordianate of the slice location.
-
zLocation
public float zLocation
DICOM z coordianate of the slice location.
-
tagTable
private FileDicomTagTable tagTable
Stores all the information about the DICOM tags.
-
isEnhancedDicom
private boolean isEnhancedDicom
whether it is enhanced dicom or not
-
lut
private ModelLUT lut
LUT for pre-processing of dicom file
-
-
Constructor Detail
-
FileInfoDicom
public FileInfoDicom(java.lang.String name, java.lang.String directory, int format)
DICOM file information constructor. Used for the file info which contains the reference tag table for an image.- Parameters:
name
- file namedirectory
- file directoryformat
- format (in this case, DICOM)
-
FileInfoDicom
public FileInfoDicom(java.lang.String name, java.lang.String directory, int format, FileInfoDicom refInfo)
DICOM file information constructor. Used for the file info which does NOT contain the reference tag table for an image.- Parameters:
name
- file namedirectory
- file directoryformat
- format (in this case, DICOM)refInfo
- The reference file info, containing the reference tag table.
-
-
Method Detail
-
setRLETAMARencapsulatedOffset
public void setRLETAMARencapsulatedOffset(int offset)
-
getRLETAMARencapsulatedOffset
public int getRLETAMARencapsulatedOffset()
-
anonymize
public final void anonymize(boolean[] list, boolean removeValue)
removes any and all personal information in the info that a doctor, patient, researcher may want to have deleted from the image, such as patient name or patient ID number--from this slice given by this fileInfoDicom.In addition, it allows the change or removal of a whole list of information, such as: ("0010,0010") Patient name; ("0010,0020") patient ID number; ("0010,0050") patient Insurance plan code sequence; ("0010,1000") other patient IDs; ("0010,1001") other patient names; ("0010,1040") patient address; ("0010,1060") patient mother's birth name; ("0010,2154") patient telephone numbers; ("0010,2160") patient ethnic group; ("0010,21D0") patient's last menstrual date; ("0010,21F0") patient religious preference; and ("0010,4000") patient comments.
- Parameters:
list
- the list of tags to remove; it MUST correspond to anonymizeTagIDs list (or spurious errors result), and it must be of the same length, or this will throw an IllegalArgumentException.- Throws:
java.lang.IllegalArgumentException
- DOCUMENT ME!
-
anonymizeSequenceTags
public void anonymizeSequenceTags(boolean[] list, java.util.Vector<FileDicomSQItem> seqs, boolean removeValue)
Method to anonymize the tags found in the DICOM supplement 55 that may appear in sequence tags. A list of sequence tags should be passed in so that you do not have to figure out which tags are sequences every time.
-
removePrivateTags
public final void removePrivateTags(FileDicomKey[] keys)
Method to remove private tags from the file. No option is given to anonymize the values. Requires an array of DICOM keys.
-
removePrivateTagsWhite
public final void removePrivateTagsWhite(FileDicomKey[] keys)
-
removePrivateSequenceTags
public final void removePrivateSequenceTags(FileDicomKey[] keys, java.util.Vector<FileDicomSQItem> seqs)
Method to anonymize private tags that may appear in sequence tags. A list of sequence tags should be passed in so that you do not have to figure out which tags are sequences every time.
-
removePrivateSequenceTagsWhite
public final void removePrivateSequenceTagsWhite(FileDicomKey[] keys, java.util.Vector<FileDicomSQItem> seqs)
-
anonymizePublicTags
public final void anonymizePublicTags(FileDicomKey[] keys, boolean removeValue)
Method to anonymize public tags that do not appear in the DICOM Supplement 55. Like in the other anonymize methods, you may instead choose to replace the value with a blank string.
-
anonymizePublicSequenceTags
public final void anonymizePublicSequenceTags(FileDicomKey[] keys, java.util.Vector<FileDicomSQItem> seqs, boolean removeValue)
Method to anonymize public tags not in the DICOM Supplement 55 that may appear in sequence tags. A list of sequence tags should be passed in so that you do not have to figure out which tags are sequences every time.
-
generateNewTagValue
public java.lang.Object generateNewTagValue(java.lang.String key, boolean remove)
Generates a new version of a particular tag that is DICOM compatible- Parameters:
key
-- Returns:
-
getLUT
public final ModelLUT getLUT()
returns the ModelLUT, if there, which might be specified by the0028,1201
,0028,1202
,0028,1203
tags.- Overrides:
getLUT
in classFileInfoBase
- Returns:
- DOCUMENT ME!
-
generateNewTagValue
public static java.lang.Object generateNewTagValue(java.lang.String key, FileDicomTagTable tagTable, boolean remove)
Generates a new version of a particular tag in the given tag table with same length that is DICOM compatible- Parameters:
key
-- Returns:
-
generateNewTagValue
public static java.lang.Object generateNewTagValue(java.lang.String key, java.lang.String strValue)
Generates a new version of a particular tag in the standard DICOM tag table with same length that is DICOM compatible- Parameters:
key
-- Returns:
-
generateNewTagValue
public static java.lang.Object generateNewTagValue(java.lang.String key, java.lang.String strValue, FileDicomTagInfo.VR vr)
Generates a new version of a particular tag given an arbitrary value and returns a DICOM compatible result- Parameters:
key
-- Returns:
-
generateNewTagValue
public static java.lang.Object generateNewTagValue(java.lang.String key, java.lang.String strValue, FileDicomTagInfo.VR vr, boolean remove)
-
displayAboutInfo
public final void displayAboutInfo(JDialogBase dialog, TransMatrix matrix)
Super requires displayAboutInfo to be defined display of this class is held by JDialogFileInfoDICOM. Should never be called.- Specified by:
displayAboutInfo
in classFileInfoBase
- Parameters:
dialog
-matrix
-- See Also:
JDialogFileInfoDICOM
-
finalize
public void finalize()
Prepares this class for cleanup.- Overrides:
finalize
in classFileInfoBase
-
setOriginalDataType
public void setOriginalDataType(int originalDataType)
-
getOriginalDataType
public int getOriginalDataType()
-
getPatientOrientation
public final TransMatrix getPatientOrientation()
This method extracts directional cosines from the DICOM image header (tag = "0020, 0037"). Since the third row of transformation matrix is not given in the tag but can be derived by taking the cross product. The result is then put into a MIPAV transformation matrix object and returned.- Returns:
- the transformation object extracted from the DICOM header. If this tag is null then the class returns null.
-
getTagTable
public final FileDicomTagTable getTagTable()
Returns a reference to the tag table for this dicom file info.- Returns:
- A reference to the tag table.
-
setTagTable
public final void setTagTable(FileDicomTagTable tagTable)
- Parameters:
tagTable
- the tagTable to set, useful when a tag table has been populated from an enhanced DICOM series.
-
isMultiFrame
public final boolean isMultiFrame()
Accessor for the status of this dicom info.- Returns:
- boolean
true
for images that think they are multi-frame.
-
setMultiFrame
public final void setMultiFrame(boolean multiFrame)
Sets whether the DICOM image is a multiFrame image.
-
parseTagValue
public final java.lang.String[] parseTagValue(java.lang.String tagName)
Parse the string for Objects seperated by "\". Uses the local method getValue to look at the Object held in the tag and decipher it for the user class into an array of strings.parseTagValue has not been updated for the newer versions of DicomTag
- Parameters:
tagName
- The name given as the key to search the Hashtable for.- Returns:
- the array of Strings that were coded into the tag; a single string is given if the string in the tag has no "\" seporators. Each String in the array is a single value, and there are value multiplicity number of Strings in the array. NOTE: user class must convert this list to the correct type; (which does indicate user class knows what returned string is) If null then there were zero tokens in the tag
-
removeStampSecondaryCapture
public void removeStampSecondaryCapture()
In anonymization cases it may be necessary to hide the fact that MIPAV has processed this image (to remove any NIH affiliation). This method removes those tags that identify any secondary capture device information contained within the image, to make it appear as if the image has not been processed.- Parameters:
fileInfo
- File info structure to set.
-
setInfoFromTags
public final void setInfoFromTags()
Public method for populating ModelImage data fields.
-
setInfoFromTags
private final void setInfoFromTags(FileDicomTagTable tagTable, boolean insideSequenceTag)
After the tag table is filled, check for a number of tags to set up some fields in this file info object.
-
updateLengthTags
private void updateLengthTags(java.util.HashMap<java.lang.Integer,FileInfoDicom.LengthStorageUnit> lengthComp)
-
appendLengthTag
private void appendLengthTag(FileDicomTag tag, java.util.HashMap<java.lang.Integer,FileInfoDicom.LengthStorageUnit> lengthComp)
-
setSecondaryCaptureTags
public void setSecondaryCaptureTags(boolean isMultiFrame, int dataType)
Changes a few dicom tags associated with a secondary capture image (marking it as having been created with mipav). This is often used after a new image is created as the result of an algorithm and the source image's file infos are copied over to the new image.
-
getModalityFromDicomStr
protected static final int getModalityFromDicomStr(java.lang.String value)
Returns the MIPAV modality constant for a given DICOM modality string.- Parameters:
value
- The DICOM modality tag value.- Returns:
- The equivalent MIPAV modality constant (or UNKNOWN_MODALITY if there is no equivalent found).
-
setInfoFromTag
protected final void setInfoFromTag(FileDicomTag tag)
Sets fields in this file info based on a given tag's key and value.- Parameters:
tag
- The tag to use to update the file info fields (not all tags cause field changes).
-
isEnhancedDicom
public boolean isEnhancedDicom()
-
setIsEnhancedDicom
public void setIsEnhancedDicom(boolean isEnhancedDicom)
-
setModalityFromDicomStr
protected final void setModalityFromDicomStr(java.lang.String value)
Uses the DICOM tag value to set the Image modality field.- Parameters:
value
- Object used is the value of DICOM tag (0008,0060)
-
getVr_type
public FileInfoDicom.VRtype getVr_type()
-
setVr_type
public void setVr_type(FileInfoDicom.VRtype vr_type)
-
-