I'm writing an application to count medical records. The application will count pages and divide it by 20 to determine the number of films needed to print the records for the client. I have a closet case where when MRI's are scanned shots (especially if they show as SC), it will only be one frame but the film is already a 20 frame MRI.
How can I determine if the a single DICOM is actually a multi frame MRI?
If I try to do a frame count on the file, I get 1
. Here is the DICOM Dump for one of the files:
(0005,0005) CS Private Creator 'NovaRad 6.0'
(0005,0006) SS Private Creator '1'
(0005,000b) CS Private Creator 'DOCTOR BOB'
(0005,0059) PN Private Creator 'PATIENT'
(0008,0000) UL Group Length '296'
(0008,0005) CS Specific Character Set 'ISO_IR 100'
(0008,0016) UI SOP Class UID '1.2.840.10008.5.1.4.1.1.7'
(0008,0018) UI SOP Instance UID '1.2.392.12345.030815.2015.8.4.10.38.18.63'
(0008,0020) DA Study Date '20131229'
(0008,0030) TM Study Time '102725'
(0008,0050) SH Accession Number ''
(0008,0060) CS Modality 'SC'
(0008,0064) CS Conversion Type 'DF'
(0008,0070) LO Manufacturer 'Radlink'
(0008,0080) LO Institution Name ''
(0008,0090) PN Referring Physician's Name 'DOCTOR BOB'
(0008,1010) SH Station Name ''
(0008,1030) LO Study Description 'L/SPINE MRI'
(0008,103e) LO Series Description ''
(0008,1090) LO Manufacturer's Model Name 'Radlink LaserPro16'
(0010,0000) UL Group Length '78'
(0010,0010) PN Patient's Name 'PATIENT'
(0010,0020) LO Patient ID ''
(0010,0030) DA Patient's Birth Date ''
(0010,0040) CS Patient's Sex 'M'
(0010,1000) LO Other Patient IDs ''
(0010,21b0) LT Additional Patient History ''
(0018,0000) UL Group Length '38'
(0018,0015) CS Body Part Examined ''
(0018,1012) DA Date of Secondary Capture '20141229'
(0018,1014) TM Time of Secondary Capture '102725'
(0020,0000) UL Group Length '132'
(0020,000d) UI Study Instance UID ''
(0020,000e) UI Series Instance UID ''
(0020,0010) SH Study ID '1'
(0020,0011) IS Series Number '1'
(0020,0013) IS Instance Number '2'
(0028,0000) UL Group Length '152'
(0028,0002) US Samples per Pixel '1'
(0028,0004) CS Photometric Interpretation 'MONOCHROME2'
(0028,0010) US Rows '2500'
(0028,0011) US Columns '2040'
(0028,0030) DS Pixel Spacing '0.1736328125'
(0028,0100) US Bits Allocated '16'
(0028,0101) US Bits Stored '16'
(0028,0102) US High Bit '15'
(0028,0103) US Pixel Representation '0'
(0028,1050) DS Window Center '42343'
(0028,1051) DS Window Width '29336'
(0028,2110) CS Lossy Image Compression '01'
(0028,2112) DS Lossy Image Compression Ratio '7.512827'
(0032,0000) UL Group Length '26'
(0032,000a) CS Study Status ID ''
(0032,000c) CS Study Priority ID '0'
(0032,1030) LO Reason for Study ''
(0040,0000) UL Group Length '8'
(0040,0241) AE Performed Station AE Title ''
(0040,1003) SH Requested Procedure Priority 'ROUTINE'
(0050,0065) CS Unknown 'DOCTOR BOB'
(7fe0,0000) UL Group Length '10200012'
(7fe0,0010) OW Pixel Data ''
Following is the code for number-of-frames, height and width:
DicomImage image = new DicomImage(ctFile.Dataset);
Console.WriteLine(image.NumberOfFrames);
Console.WriteLine(image.Width);
Console.WriteLine(image.Height);
Gives me:
NumFrames: 1
Width: 2040
Height: 2500