DicomImage Class |
DicomImage is a representation of raw or processed DicomImage data. DicomImage is meant to be used by those who need to do efficient and repeated window and leveling processing of image data.
The DicomImage object implements the IDisposable interface because it contains system resources that need to be freed. It should be noted that all DicomImage objects should be disposed before an application exits. Failure to do so may cause the application to throw an exception.
Namespace: Atalasoft.Imaging.Codec.Dicom
The DicomImage type exposes the following members.
Name | Description | |
---|---|---|
DefaultLeveling | An integer representing the default leveling as specified by the Dicom file. | |
DefaultWindow | An integer representing the default window center as specified by the Dicom file. | |
Height | The height of the DicomImage in pixels. | |
ImageCameFromSignedSamples | Indicates whether or not the image data came from signed samples. | |
ImageDataShiftedBy | An integer representing how the image samples were transformed if they had been signed. | |
PixelFormat | The PixelFormat of the image. | |
Width | The width of the image in pixels |
Name | Description | |
---|---|---|
AllocateAtalaImage | Allocates an AtalaImage object into which this DicomImage could be transformed. | |
Dispose | Releases all resources used by the DicomImage | |
Dispose(Boolean) | Releases the unmanaged resources used by the DicomImage and optionally releases the managed resources | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetAtalaImage | Transforms the DicomImage into a new AtalaImage object. | |
GetAtalaImage(AtalaImage) | Transforms the DicomImage into the supplied AtalaImage object. | |
GetAtalaImage(Int32, Int32) | Allocates a new AtalaImage object and transforms the DicomImage data into it using the window and leveling
values. | |
GetAtalaImage(AtalaImage, Int32, Int32) | Transforms the DicomImage into the given AtalaImage, applying the window and leveling. | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
DicomImage objects reflect a few of the internal quirks of the DicomStandard. Very often DicomImages have been stored with samples that were signed rather than unsigned data. It is necessary to know this information when applying window and leveling as it affects how the data is interpreted.
DicomImage objects cannot be constructed directly. Instead, DicomImage objects are constructed through the DicomDataset object via the Get...Image() methods. It should be noted that calling a Get...Image() method will make unique copies of each image and will consume a commensurate amount of memory.
If an image was built from signed samples, the property ImageCameFromSignedSamples will be true and the property ImageDataShiftedBy will be set to the value that was added to the samples to put them into the signed range. This value should be added to the window value before window and leveling is applied.