Project hosted at

SourceForge

with
PmWiki

Dicom

DICOM 3.0

A gigantic medical format from a standards association. One should pay for a root UID in order to generate unique ID's in relation to DICOM databases. Our DICOM read routines still depends on a neat library written by a colleague Tony Voet. It is small and written entirely in plain good old C code. We did change the original code piecemeal to fulfill (X)MedCon's needs.
scaling factors / quantitation:
The DICOM standard provides two manners for rescaling the pixel values: a rescale slope & intercept and/or a window width & center contrast remapping. Both are supported in (X)MedCon. To enable the contrast use the -contrast option. To enable slope & intercept you should select one of the quantitation options -qs or -qc.
patient/slice orientations:
The most complete and complex of all formats. We do copy the associated tags but misinterpretations are possible (and certain for non-orthogonal slices).
UID's (unique identifiers):
A disclaimer first: indeed, we don't have any clue whether this is how it's supposed to be.
...
The main idea of UID's in DICOM is grouping files together, based on equal studies and series (frame of reference, etc ...). The creation process for our UID's can be found in the m-dicm.c file, more precisely in the function MdcDicomMakeUID(). All hashes use the SDBM algorithm found here. The syntax of the UID's is as follows (as of release 0.9.9.5):

777.777.0.0.0.< A >.< B >.< C >.< D >

The colored variable numbers are:
< A > = <universal time in seconds>
If not available, it will be replaced with a simple 777 triplet
< B > = MdcHashSDBM(<patient_name><patient_id><year><month><day><hour><minute><second>)
If string is common "Unknown000000000", the MdcHashSDBM(<A>) will be used instead
< C > = MdcHashSDBM(input filename)
The same hash is used for subsequent output, unless fi->nr_series changes or fi->nr_series <= 0.
< D > = MdcHashSDBM(output filename)
where
InstanceCreatorUID (0008,0014) = 777.777.0.0.0
StudyInstanceUID (0020,000d) = FrameOfReferenceUID (0020,0052) = 777.777.0.0.0.<A>.<B>
SeriesInstanceUID (0020,000e) = 777.777.0.0.0.<A>.<B>.<C>
SOPInstanceUID (0008,0018) = MediaStorageSOPClassUID (0002,0002) = 777.777.0.0.0 <A>.<B>.<C>.<D>
The <universal time in seconds> does not change within the same medcon CLI program call (during medcon batch conversion, splitframes, splitslices, volumestack). This is to keep several output files within the same study. For the xmedcon GUI program it does change at each file saved.
Please note that our CreatorUID 777.777.0.0.0 is fake and could be assigned to another association, institute or manufacturer. It should be replaced with "your" root UID.
extra notes:
- Default output transfer syntax is explicit VR hostendian, unless a different output endian was selected. The implicit VR little endian transfer syntax is possible through the -implicit option.
- All formats converted to DICOM are written in the NM modality.
- The option -mosaic enables support for mosaic files. Because only one specific dialect can be autodetected, others should use the -fmosaic option to enforce user defined mosaic layout. See also options -mfixv and -interl.
- The option -gap is useful for files where the "slice spacing" (tag 0x0018:0x0088) is used as a true spacing (gap/overlap) between two adjacent slices, this in contrary to what the DICOM drafts mention: the spacing is measured from the centre to centre of each slice. In this case the new slice spacing value becomes:
slice_spacing(dicom) = slice_spacing(true) + slice_width [mm]
- The option -contrast enables the window center/width contrast adjusting as used in MR and CT modality. In case slope/intercept are integer values, the affine transformation will be done first
- Colored (RGB, HSV) DICOM images are reduced to 8-bit color indexed images.
- Our code can handle encapsulated RLE & lossless JPEG pixel data, with a big thanks to Jaslet Bertrand. Any contribution on lossy JPEG are most welcome.
- There is some support for gated studies as well. Some more information can be found here.
Format: DICOM 3.0  
ItemSupportedUnsupported
Color Mapgrayscale, color-
File Endianlittle & big-
Pixel Typesall integers (signed/unsigned), rgbfloat & double
Scaling Factorsscaling slope & intercept OR window center & width
Dimensions / Imagedifferent dimensions for each image are supported
Pixel Types / Imagedifferent pixeltypes for each image are supported

<< ECAT 6/7 | Documentation | Acr/Nema 2.0 >>