Некоторые из файлов DICOM, которые я пытаюсь обработать, содержат необычные значения данных в пикселях - намного выше, чем должны быть, если тег "(0018,0070) Counts Accumulated" правильный. Например, когда я читаю файл с таким кодом:
DicomImage *di = new DicomImage("C:\\TestImages\\TestImage1.dcm");
const DiPixel *dmp = di->getInterData();
void *pixelData = (void *)dmp->getData();
unsigned long frameCount = di->getFrameCount();
unsigned long width = di->getWidth();
unsigned long height = di->getHeight();
unsigned long pixelCount = width*height*frameCount;
long pixelTotal = 0;
EP_Representation rep = dmp->getRepresentation();
switch(rep)
{
case EPR_Sint16:
{
for (unsigned long idx = 0; idx < pixelCount; idx++)
{
Sint16 tmpVal = *((Sint16*)pixelData + idx);
pixelTotal += tmpVal;
}
break;
}
}
... общее количество пикселей составляет 137,480,751. Тег накопленного количества показывает только 9 197 760 отсчетов. На других файлах эти значения очень близки. В метаданных (см. Ниже) я не вижу ничего, что могло бы объяснить эту проблему.
Не правильно ли я получаю доступ к пиксельным данным?
Спасибо за любую помощь.
Вот данные тега из файла DICOM:
# Dicom-File-Format
# Dicom-Meta-Information-Header
# Used TransferSyntax: Little Endian Explicit
(0002,0000) UL 196 # 4, 1 FileMetaInformationGroupLength
(0002,0001) OB 00\01 # 2, 1 FileMetaInformationVersion
(0002,0002) UI =NuclearMedicineImageStorage # 26, 1 MediaStorageSOPClassUID
(0002,0003) UI [1.2.840.113619.2.281.40117.1721915056.1569958338.4819840] # 56, 1 MediaStorageSOPInstanceUID
(0002,0010) UI =LittleEndianExplicit # 20, 1 TransferSyntaxUID
(0002,0012) UI [1.3.6.1.4.1.16978.0.3.5.4.31] # 28, 1 ImplementationClassUID
(0002,0013) SH [EV-3.5.4-31] # 12, 1 ImplementationVersionName
# Dicom-Data-Set
# Used TransferSyntax: Little Endian Explicit
(0008,0005) CS [ISO_IR 192] # 10, 1 SpecificCharacterSet
(0008,0008) CS [DERIVED\PRIMARY\RECON TOMO\EMISSION] # 36, 4 ImageType
(0008,0012) DA [20191001] # 8, 1 InstanceCreationDate
(0008,0013) TM [153352.0000] # 12, 1 InstanceCreationTime
(0008,0014) UI [1.2.840.113619.6.281] # 20, 1 InstanceCreatorUID
(0008,0016) UI =NuclearMedicineImageStorage # 26, 1 SOPClassUID
(0008,0018) UI [1.2.840.113619.2.281.40117.1721915056.1569958338.4819840] # 56, 1 SOPInstanceUID
(0008,0020) DA [20191001] # 8, 1 StudyDate
(0008,0021) DA [20191001] # 8, 1 SeriesDate
(0008,0022) DA [20191001] # 8, 1 AcquisitionDate
(0008,0023) DA [20191001] # 8, 1 ContentDate
(0008,0030) TM [144205.00] # 10, 1 StudyTime
(0008,0031) TM [153219.00] # 10, 1 SeriesTime
(0008,0032) TM [145311.00] # 10, 1 AcquisitionTime
(0008,0033) TM [153219.00] # 10, 1 ContentTime
(0008,0050) SH [9618265] # 8, 1 AccessionNumber
(0008,0056) CS [ONLINE] # 6, 1 InstanceAvailability
(0008,0060) CS [NM] # 2, 1 Modality
(0008,0070) LO [GE MEDICAL SYSTEMS, NUCLEAR] # 28, 1 Manufacturer
(0008,0080) LO [] # 4, 1 InstitutionName
(0008,0090) PN [] # 14, 1 ReferringPhysicianName
(0008,1010) SH [XELERIS-US492JR] # 16, 1 StationName
(0008,1030) LO [] # 12, 1 StudyDescription
(0008,1032) SQ (Sequence with undefined length #=1) # u/l, 1 ProcedureCodeSequence
(fffe,e000) na (Item with undefined length #=3) # u/l, 1 Item
(0008,0100) SH [NMLIVER] # 8, 1 CodeValue
(0008,0102) SH [L] # 2, 1 CodingSchemeDesignator
(0008,0104) LO [NM LIVER] # 8, 1 CodeMeaning
(fffe,e00d) na (ItemDelimitationItem) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem) # 0, 0 SequenceDelimitationItem
(0008,103e) LO [NM - Transaxials] # 16, 1 SeriesDescription
(0008,1040) LO [RADIOLOGY] # 10, 1 InstitutionalDepartmentName
(0008,1060) PN (no value available) # 0, 0 NameOfPhysiciansReadingStudy
(0008,1070) PN [] # 18, 1 OperatorsName
(0008,1080) LO (no value available) # 0, 0 AdmittingDiagnosesDescription
(0008,1090) LO [Tandem_Discovery_670_ES] # 24, 1 ManufacturerModelName
(0008,1110) SQ (Sequence with undefined length #=0) # u/l, 1 ReferencedStudySequence
(fffe,e0dd) na (SequenceDelimitationItem) # 0, 0 SequenceDelimitationItem
(0010,0010) PN [ANONYMIZED_0000000] # 18, 1 PatientName
(0010,0020) LO [ID-00000] # 8, 1 PatientID
(0010,0021) LO [XXXXR&2.16.840.1.114107.1.1.16.2.5&ISO] # 40, 1 IssuerOfPatientID
(0010,0030) DA [99999999] # 8, 1 PatientBirthDate
(0010,0032) TM [000000] # 6, 1 PatientBirthTime
(0010,0040) CS [M] # 2, 1 PatientSex
(0010,1000) LO [XXXXX&2.16.840.1.114107.1.1.16.2.6&ISO] # 44, 1 OtherPatientIDs
(0010,1001) PN (no value available) # 0, 0 OtherPatientNames
(0010,1002) SQ (Sequence with undefined length #=3) # u/l, 1 OtherPatientIDsSequence
(fffe,e000) na (Item with undefined length #=2) # u/l, 1 Item
(0010,0020) LO [21277062] # 8, 1 PatientID
(0010,0021) LO [XXXXX&2.16.840.1.114107.1.1.16.2.5&ISO] # 40, 1 IssuerOfPatientID
(fffe,e00d) na (ItemDelimitationItem) # 0, 0 ItemDelimitationItem
(fffe,e000) na (Item with undefined length #=2) # u/l, 1 Item
(0010,0020) LO [306263] # 6, 1 PatientID
(0010,0021) LO [XXXX&2.16.840.1.114107.1.1.16.2.9&ISO] # 38, 1 IssuerOfPatientID
(fffe,e00d) na (ItemDelimitationItem) # 0, 0 ItemDelimitationItem
(fffe,e000) na (Item with undefined length #=2) # u/l, 1 Item
(0010,0020) LO [7305000] # 8, 1 PatientID
(0010,0021) LO [XXXX&2.16.840.1.114107.1.1.16.2.3&ISO] # 38, 1 IssuerOfPatientID
(fffe,e00d) na (ItemDelimitationItem) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem) # 0, 0 SequenceDelimitationItem
(0010,1010) AS [041Y] # 4, 1 PatientAge
(0010,1020) DS [0] # 2, 1 PatientSize
(0010,1030) DS [0] # 2, 1 PatientWeight
(0010,2000) LO (no value available) # 0, 0 MedicalAlerts
(0010,2160) SH (no value available) # 0, 0 EthnicGroup
(0010,2180) SH (no value available) # 0, 0 Occupation
(0010,21b0) LT (no value available) # 0, 0 AdditionalPatientHistory
(0010,4000) LT (no value available) # 0, 0 PatientComments
(0018,0015) CS [ABDOMEN] # 8, 1 BodyPartExamined
(0018,0050) DS [4.4196] # 6, 1 SliceThickness
(0018,0070) IS [9197760] # 8, 1 CountsAccumulated
(0018,0071) CS [TIME] # 4, 1 AcquisitionTerminationCondition
(0018,0088) DS [-3.75] # 6, 1 SpacingBetweenSlices
(0018,1000) LO [XXXX35010] # 10, 1 DeviceSerialNumber
(0018,1020) LO [1.003.435.0\HARDWARE_VERSION_1\Xeleris4.0117] # 44, 3 SoftwareVersions
(0018,1030) LO [User&Gastro Intestinal&XXXXXXX SCAN] # 36, 1 ProtocolName
(0018,1061) LO [EKG] # 4, 1 TriggerSourceOrType
(0018,1243) IS [5291] # 4, 1 CountRate
(0020,000d) UI [1.2.840.113696.563627.530.969312.2019093008183] # 46, 1 StudyInstanceUID
(0020,000e) UI [1.2.840.113619.2.281.40117.1721915056.1569958339.48100] # 54, 1 SeriesInstanceUID
(0020,0010) SH [XXXXXXX SCAN] # 12, 1 StudyID
(0020,0011) IS [10] # 2, 1 SeriesNumber
(0020,0013) IS [1] # 2, 1 InstanceNumber
(0020,0052) UI [1.2.840.113619.2.280.2.1.1102019145254613.1532379478] # 52, 1 FrameOfReferenceUID
(0020,1040) LO (no value available) # 0, 0 PositionReferenceIndicator
(0020,4000) LT [$ProcessingParentUID1$1.2.840.113619.2.55.3.330053014.225.15699256... # 158, 1 ImageComments
(0028,0002) US 1 # 2, 1 SamplesPerPixel
(0028,0004) CS [MONOCHROME2] # 12, 1 PhotometricInterpretation
(0028,0008) IS [107] # 4, 1 NumberOfFrames
(0028,0009) AT (0054,0080) # 4, 1 FrameIncrementPointer
(0028,0010) US 128 # 2, 1 Rows
(0028,0011) US 128 # 2, 1 Columns
(0028,0030) DS [4.419600\4.419600] # 18, 2 PixelSpacing
(0028,0051) CS [ATTN] # 4, 1 CorrectedImage
(0028,0100) US 16 # 2, 1 BitsAllocated
(0028,0101) US 16 # 2, 1 BitsStored
(0028,0102) US 15 # 2, 1 HighBit
(0028,0103) US 1 # 2, 1 PixelRepresentation
(0028,0106) SS -37 # 2, 1 SmallestImagePixelValue
(0028,0107) SS 5962 # 2, 1 LargestImagePixelValue
(0028,1050) DS [2962.500000] # 12, 1 WindowCenter
(0028,1051) DS [5999.000000] # 12, 1 WindowWidth
(0032,000a) CS [VER] # 4, 1 RETIRED_StudyStatusID
(0032,1032) PN [XXXXXXXXXXXXXXXXXXXXXX] # 22, 1 RequestingPhysician
(0032,1060) LO [NM LIVER SPECT] # 14, 1 RequestedProcedureDescription
(0032,1064) SQ (Sequence with undefined length #=1) # u/l, 1 RequestedProcedureCodeSequence
(fffe,e000) na (Item with undefined length #=3) # u/l, 1 Item
(0008,0100) SH [NM0307] # 6, 1 CodeValue
(0008,0102) SH (no value available) # 0, 0 CodingSchemeDesignator
(0008,0104) LO [NM LIVER SPECT] # 14, 1 CodeMeaning
(fffe,e00d) na (ItemDelimitationItem) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem) # 0, 0 SequenceDelimitationItem
(0038,0010) LO (no value available) # 0, 0 AdmissionID
(0038,0011) LO [XXXX] # 4, 1 RETIRED_IssuerOfAdmissionID
(0038,0500) LO (no value available) # 0, 0 PatientState
(0040,1001) SH [9618265] # 8, 1 RequestedProcedureID
(0040,1003) SH [R] # 2, 1 RequestedProcedurePriority
(0040,2008) PN [XXXXXX] # 6, 1 OrderEnteredBy
(0040,2009) SH (no value available) # 0, 0 OrderEntererLocation
(0040,2010) SH (no value available) # 0, 0 OrderCallbackPhoneNumber
(0040,e010) UT [XX1:2019/10/01/15/33/32/ids.2180550038755934932.tar,1196032,678904] # 66, 1 RetrieveURI
(0054,0011) US 1 # 2, 1 NumberOfEnergyWindows
(0054,0012) SQ (Sequence with undefined length #=1) # u/l, 1 EnergyWindowInformationSequence
(fffe,e000) na (Item with undefined length #=2) # u/l, 1 Item
(0054,0013) SQ (Sequence with undefined length #=1) # u/l, 1 EnergyWindowRangeSequence
(fffe,e000) na (Item with undefined length #=2) # u/l, 1 Item
(0054,0014) DS [126.45] # 6, 1 EnergyWindowLowerLimit
(0054,0015) DS [154.55] # 6, 1 EnergyWindowUpperLimit
(fffe,e00d) na (ItemDelimitationItem) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem) # 0, 0 SequenceDelimitationItem
(0054,0018) SH [Tc99m_EM] # 8, 1 EnergyWindowName
(fffe,e00d) na (ItemDelimitationItem) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem) # 0, 0 SequenceDelimitationItem
(0054,0016) SQ (Sequence with undefined length #=1) # u/l, 1 RadiopharmaceuticalInformationSequence
(fffe,e000) na (Item with undefined length #=5) # u/l, 1 Item
(0018,0031) LO [Technetium Tc99c sulfur colloid] # 32, 1 Radiopharmaceutical
(0018,1071) DS [0] # 2, 1 RadiopharmaceuticalVolume
(0018,1074) DS [0.000000] # 8, 1 RadionuclideTotalDose
(0054,0300) SQ (Sequence with undefined length #=1) # u/l, 1 RadionuclideCodeSequence
(fffe,e000) na (Item with undefined length #=3) # u/l, 1 Item
(0008,0100) SH [C-163A8] # 8, 1 CodeValue
(0008,0102) SH [99SDM] # 6, 1 CodingSchemeDesignator
(0008,0104) LO [^99m^Technetium] # 16, 1 CodeMeaning
(fffe,e00d) na (ItemDelimitationItem) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem) # 0, 0 SequenceDelimitationItem
(0054,0304) SQ (Sequence with undefined length #=1) # u/l, 1 RadiopharmaceuticalCodeSequence
(fffe,e000) na (Item with undefined length #=3) # u/l, 1 Item
(0008,0100) SH [C-B1222] # 8, 1 CodeValue
(0008,0102) SH [SRT] # 4, 1 CodingSchemeDesignator
(0008,0104) LO [Technetium Tc^99m^ sulfur colloid] # 34, 1 CodeMeaning
(fffe,e00d) na (ItemDelimitationItem) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem) # 0, 0 SequenceDelimitationItem
(fffe,e00d) na (ItemDelimitationItem) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem) # 0, 0 SequenceDelimitationItem
(0054,0021) US 1 # 2, 1 NumberOfDetectors
(0054,0022) SQ (Sequence with undefined length #=1) # u/l, 1 DetectorInformationSequence
(fffe,e000) na (Item with undefined length #=13) # u/l, 1 Item
(0018,1120) DS [0] # 2, 1 GantryDetectorTilt
(0018,1145) DS [0] # 2, 1 CenterOfRotationOffset
(0018,1147) CS (no value available) # 0, 0 FieldOfViewShape
(0018,1149) IS [0\0] # 4, 2 FieldOfViewDimensions
(0018,1180) SH [LEHR] # 4, 1 CollimatorGridName
(0018,1181) CS [PARA] # 4, 1 CollimatorType
(0018,1182) IS [0] # 2, 1 FocalDistance
(0018,1183) DS [0] # 2, 1 XFocusCenter
(0018,1184) DS [0] # 2, 1 YFocusCenter
(0020,0032) DS [-281.133009\-281.133009\200.000000] # 34, 3 ImagePositionPatient
(0020,0037) DS [1.000000\0.000000\0.000000\0.000000\1.000000\0.000000] # 54, 6 ImageOrientationPatient
(0028,0031) DS [1.000000\1.000000] # 18, 2 ZoomFactor
(0028,0032) DS [0.000000\0.000000] # 18, 2 ZoomCenter
(fffe,e00d) na (ItemDelimitationItem) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem) # 0, 0 SequenceDelimitationItem
(0054,0051) US 1 # 2, 1 NumberOfRotations
(0054,0052) SQ (Sequence with undefined length #=1) # u/l, 1 RotationInformationSequence
(fffe,e000) na (Item with undefined length #=9) # u/l, 1 Item
(0018,1130) DS [150.6] # 6, 1 TableHeight
(0018,1131) DS [1389.2] # 6, 1 TableTraverse
(0018,1140) CS [CW] # 2, 1 RotationDirection
(0018,1142) DS [281.442] # 8, 1 RadialPosition
(0018,1143) DS [360] # 4, 1 ScanArc
(0018,1144) DS [3] # 2, 1 AngularStep
(0018,1242) IS [15000] # 6, 1 ActualFrameDuration
(0054,0053) US 120 # 2, 1 NumberOfFramesInRotation
(0054,0200) DS [180.62] # 6, 1 StartAngle
(fffe,e00d) na (ItemDelimitationItem) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem) # 0, 0 SequenceDelimitationItem
(0054,0080) US 1\2\3\4\5\6\7\8\9\10\11\12\13\14\15\16\17\18\19\20\21\22\23\24\25... # 214,107 SliceVector
(0054,0081) US 107 # 2, 1 NumberOfSlices
(0054,0202) CS [STEP AND SHOOT] # 14, 1 TypeOfDetectorMotion
(0054,0400) SH [LIVER SPECT CT_E] # 16, 1 ImageID
(0054,0410) SQ (Sequence with undefined length #=1) # u/l, 1 PatientOrientationCodeSequence
(fffe,e000) na (Item with undefined length #=4) # u/l, 1 Item
(0008,0100) SH [F-10450] # 8, 1 CodeValue
(0008,0102) SH [99SDM] # 6, 1 CodingSchemeDesignator
(0008,0104) LO [recumbent] # 10, 1 CodeMeaning
(0054,0412) SQ (Sequence with undefined length #=1) # u/l, 1 PatientOrientationModifierCodeSequence
(fffe,e000) na (Item with undefined length #=3) # u/l, 1 Item
(0008,0100) SH [F-10340] # 8, 1 CodeValue
(0008,0102) SH [99SDM] # 6, 1 CodingSchemeDesignator
(0008,0104) LO [supine] # 6, 1 CodeMeaning
(fffe,e00d) na (ItemDelimitationItem) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem) # 0, 0 SequenceDelimitationItem
(fffe,e00d) na (ItemDelimitationItem) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem) # 0, 0 SequenceDelimitationItem
(0054,0414) SQ (Sequence with undefined length #=1) # u/l, 1 PatientGantryRelationshipCodeSequence
(fffe,e000) na (Item with undefined length #=3) # u/l, 1 Item
(0008,0100) SH [F-10480] # 8, 1 CodeValue
(0008,0102) SH [99SDM] # 6, 1 CodingSchemeDesignator
(0008,0104) LO [feet-first] # 10, 1 CodeMeaning
(fffe,e00d) na (ItemDelimitationItem) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem) # 0, 0 SequenceDelimitationItem
(0400,0561) SQ (Sequence with undefined length #=1) # u/l, 1 OriginalAttributesSequence
(fffe,e000) na (Item with undefined length #=5) # u/l, 1 Item
(0400,0550) SQ (Sequence with undefined length #=1) # u/l, 1 ModifiedAttributesSequence
(fffe,e000) na (Item with undefined length #=1) # u/l, 1 Item
(0008,0080) LO [XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX] # 38, 1 InstitutionName
(fffe,e00d) na (ItemDelimitationItem) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem) # 0, 0 SequenceDelimitationItem
(0400,0562) DT [20191001153109] # 14, 1 AttributeModificationDateTime
(0400,0563) LO [Compass 2.6.1] # 14, 1 ModifyingSystem
(0400,0564) LO (no value available) # 0, 0 SourceOfPreviousValues
(0400,0565) CS [COERCE] # 6, 1 ReasonForTheAttributeModification
(fffe,e00d) na (ItemDelimitationItem) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem) # 0, 0 SequenceDelimitationItem
Есть идеи?