Ver Fonte

tianjia DCM

刘桂岩 há 5 anos atrás
pai
commit
a94245f7ce

+ 59 - 0
application/common/library/DicomPaserTag.php

@@ -0,0 +1,59 @@
+<?php
+
+namespace app\common\library;
+use app\common\library\DicomTag;
+class DicomPaserTag {
+    const DICOM_TAG = [
+        "patientName" => DicomTag::patientName,
+        "patientId" => DicomTag::patientId,
+        "birthDate" => DicomTag::birthDate,
+        "birthTime" => DicomTag::birthTime,
+        "patientSex" => DicomTag::patientSex,
+        "pregnancy" => DicomTag::pregnancy,
+        "weight" => DicomTag::weight,
+        "institutionName" => DicomTag::institutionName,
+        "institutionCode" => DicomTag::institutionCode,
+        "patientAge" => DicomTag::patientAge,
+        "accessionNumber" => DicomTag::accessionNumber,
+        "studyId" => DicomTag::studyId,
+        "studyUid" => DicomTag::studyUid,
+        "studyDate" => DicomTag::studyDate,
+        "studyTime" => DicomTag::studyTime,
+        "modalities" => DicomTag::modalities,
+        "partExamined" => DicomTag::partExamined,
+        "studyDescription" => DicomTag::studyDescription,
+        "seriesDescription" => DicomTag::seriesDescription,
+        "seriesNumber" => DicomTag::seriesNumber,
+        "seriesUid" => DicomTag::seriesUid,
+        "modality" => DicomTag::modality,
+        "seriesDate" => DicomTag::seriesDate,
+        "seriesTime" => DicomTag::seriesTime,
+        "imagePosition" => DicomTag::imagePosition,
+        "imageOrientation" => DicomTag::imageOrientation,
+        "sliceThickness" => DicomTag::sliceThickness,
+        "spacingSlices" => DicomTag::spacingSlices,
+        "sliceLocation" => DicomTag::sliceLocation,
+        "MRAcquisition" => DicomTag::MRAcquisition,
+        "imageType" => DicomTag::imageType,
+        "imageId" => DicomTag::imageId,
+        "contentDate" => DicomTag::contentDate,
+        "contentTime" => DicomTag::contentTime,
+        "imageNumber" => DicomTag::imageNumber,
+        "pixel" => DicomTag::pixel,
+        "rows" => DicomTag::rows,
+        "columns" => DicomTag::columns,
+        "pixelSpacing" => DicomTag::pixelSpacing,
+        "bitsStored" => DicomTag::bitsStored,
+        "highBit" => DicomTag::highBit,
+        "pixelRepresentation" => DicomTag::pixelRepresentation,
+        "windowCenter" => DicomTag::windowCenter,
+        "windowWidth" => DicomTag::windowWidth,
+        "rescaleIntercept" => DicomTag::rescaleIntercept,
+        "rescaleSlope" => DicomTag::rescaleSlope,
+        "rescaleType" => DicomTag::rescaleType,
+        "SOPInstanceUID" => DicomTag::SOPInstanceUID,
+        "numberOfFrames" => DicomTag::numberOfFrames,
+    ];
+}
+
+

+ 400 - 0
application/common/library/DicomTag.php

@@ -0,0 +1,400 @@
+<?php
+
+namespace app\common\library;
+
+class DicomTag {
+    const patientName = [
+        "group" => 0x0010,
+        "element" => 0x0010,
+        "vr" => "PN",
+        "type" => "string",
+        "default" => "",
+        "field" => "patientName"
+    ];
+    const patientId = [
+        "group" => 0x0010,
+        "element" => 0x0020,
+        "vr" => "LO",
+        "type" => "string",
+        "default" => "",
+        "field" => "patientId"
+    ];
+    const birthDate = [
+        "group" => 0x0010,
+        "element" => 0x0030,
+        "vr" => "DA",
+        "type" => "string",
+        "default" => "",
+        "field" => "birthDate"
+    ];
+    const birthTime = [
+        "group" => 0x0010,
+        "element" => 0x0032,
+        "vr" => "TM",
+        "type" => "string",
+        "default" => "",
+        "field" => "birthTime"
+    ];
+    const patientSex = [
+        "group" => 0x0010,
+        "element" => 0x0040,
+        "vr" => "CS",
+        "type" => "string",
+        "default" => "",
+        "field" => "patientSex"
+    ];
+    const pregnancy = [
+        "group" => 0x0010,
+        "element" => 0x21c0,
+        "vr" => "US",
+        "type" => "string",
+        "default" => "",
+        "field" => "pregnancy"
+    ];
+    const weight = [
+        "group" => 0x0010,
+        "element" => 0x1030,
+        "vr" => "DS",
+        "type" => "string",
+        "default" => "",
+        "field" => "weight"
+    ];
+    const institutionName = [
+        "group" => 0x0008,
+        "element" => 0x0080,
+        "vr" => "US",
+        "type" => "string",
+        "default" => "",
+        "field" => "institutionName"
+    ];
+    const institutionCode = [
+        "group" => 0x0008,
+        "element" => 0x0082,
+        "vr" => "US",
+        "type" => "string",
+        "default" => "",
+        "field" => "institutionCode"
+    ];
+    const patientAge = [
+        "group" => 0x0010,
+        "element" => 0x1010,
+        "vr" => "AS",
+        "type" => "string",
+        "default" => "",
+        "field" => "patientAge"
+    ];
+    const accessionNumber = [
+        "group" => 0x0008,
+        "element" => 0x0050,
+        "vr" => "SH",
+        "type" => "string",
+        "default" => "",
+        "field" => "accessionNumber"
+    ];
+    const studyId = [
+        "group" => 0x0020,
+        "element" => 0x0010,
+        "vr" => "SH",
+        "type" => "string",
+        "default" => "",
+        "field" => "studyId"
+    ];
+    const studyUid = [
+        "group" => 0x0020,
+        "element" => 0x000d,
+        "vr" => "UI",
+        "type" => "string",
+        "default" => "",
+        "field" => "studyUid"
+    ];
+    const studyDate = [
+        "group" => 0x0008,
+        "element" => 0x0020,
+        "vr" => "DA",
+        "type" => "string",
+        "default" => "",
+        "field" => "studyDate"
+    ];
+    const studyTime = [
+        "group" => 0x0008,
+        "element" => 0x0030,
+        "vr" => "TM",
+        "type" => "string",
+        "default" => "",
+        "field" => "studyTime"
+    ];
+    const modalities = [
+        "group" => 0x0008,
+        "element" => 0x0061,
+        "vr" => "CS",
+        "type" => "string",
+        "default" => "",
+        "field" => "modalities"
+    ];
+    const partExamined = [
+        "group" => 0x0018,
+        "element" => 0x0015,
+        "vr" => "CS",
+        "type" => "string",
+        "default" => "",
+        "field" => "partExamined"
+    ];
+    const studyDescription = [
+        "group" => 0x0008,
+        "element" => 0x1030,
+        "vr" => "LO",
+        "type" => "string",
+        "default" => "",
+        "field" => "studyDescription"
+    ];
+    const seriesDescription = [
+        "group" => 0x0008,
+        "element" => 0x103e,
+        "vr" => "LO",
+        "type" => "string",
+        "default" => "",
+        "field" => "seriesDescription"
+    ];
+    const seriesNumber = [
+        "group" => 0x0020,
+        "element" => 0x0011,
+        "vr" => "IS",
+        "type" => "int",
+        "default" => 0,
+        "field" => "seriesNumber"
+    ];
+    const seriesUid = [
+        "group" => 0x0020,
+        "element" => 0x000e,
+        "vr" => "UI",
+        "type" => "string",
+        "default" => "",
+        "field" => "seriesUid"
+    ];
+    const modality = [
+        "group" => 0x0008,
+        "element" => 0x0060,
+        "vr" => "CS",
+        "type" => "string",
+        "default" => "",
+        "field" => "modality"
+    ];
+    const seriesDate = [
+        "group" => 0x0008,
+        "element" => 0x0021,
+        "vr" => "DA",
+        "type" => "string",
+        "default" => "",
+        "field" => "seriesDate"
+    ];
+    const seriesTime = [
+        "group" => 0x0008,
+        "element" => 0x0031,
+        "vr" => "DA",
+        "type" => "string",
+        "default" => "",
+        "field" => "seriesTime"
+    ];
+
+    const imagePosition = [
+        "group" => 0x0020,
+        "element" => 0x0032,
+        "vr" => "DS",
+        "type" => "string",
+        "default" => "",
+        "field" => "imagePosition"
+    ];
+    const imageOrientation = [
+        "group" => 0x0020,
+        "element" => 0x0037,
+        "vr" => "DS",
+        "type" => "string",
+        "default" => "",
+        "field" => "imageOrientation"
+    ];
+    const sliceThickness = [
+        "group" => 0x0018,
+        "element" => 0x0050,
+        "vr" => "DS",
+        "type" => "string",
+        "default" => "",
+        "field" => "sliceThickness"
+    ];
+    const spacingSlices = [
+        "group" => 0x0018,
+        "element" => 0x0088,
+        "vr" => "DS",
+        "type" => "string",
+        "default" => "",
+        "field" => "spacingSlices"
+    ];
+    const sliceLocation = [
+        "group" => 0x0020,
+        "element" => 0x1041,
+        "vr" => "DS",
+        "type" => "string",
+        "default" => "",
+        "field" => "sliceLocation"
+    ];
+    const MRAcquisition = [
+        "group" => 0x0018,
+        "element" => 0x0023,
+        "vr" => "CS",
+        "type" => "string",
+        "default" => "",
+        "field" => "MRAcquisition"
+    ];
+    const imageType = [
+        "group" => 0x0008,
+        "element" => 0x0008,
+        "vr" => "CS",
+        "type" => "string",
+        "default" => "",
+        "field" => "imageType"
+    ];
+    const imageId = [
+        "group" => 0x0008,
+        "element" => 0x0018,
+        "vr" => "UI",
+        "type" => "string",
+        "default" => "",
+        "field" => "imageId"
+    ];
+    const contentDate = [
+        "group" => 0x0008,
+        "element" => 0x0023,
+        "vr" => "DA",
+        "type" => "string",
+        "default" => "",
+        "field" => "contentDate"
+    ];
+    const contentTime = [
+        "group" => 0x0008,
+        "element" => 0x0033,
+        "vr" => "TM",
+        "type" => "string",
+        "default" => "",
+        "field" => "contentTime"
+    ];
+    const imageNumber = [
+        "group" => 0x0020,
+        "element" => 0x0013,
+        "vr" => "IS",
+        "type" => "int",
+        "default" => 0,
+        "field" => "imageNumber"
+    ];
+    const pixel = [
+        "group" => 0x0028,
+        "element" => 0x0002,
+        "vr" => "US",
+        "type" => "string",
+        "default" => "",
+        "field" => "pixel"
+    ];
+    const rows = [
+        "group" => 0x0028,
+        "element" => 0x0010,
+        "vr" => "US",
+        "type" => "string",
+        "default" => "",
+        "field" => "rows"
+    ];
+    const columns = [
+        "group" => 0x0028,
+        "element" => 0x0011,
+        "vr" => "US",
+        "type" => "string",
+        "default" => "",
+        "field" => "columns"
+    ];
+    const pixelSpacing = [
+        "group" => 0x0028,
+        "element" => 0x0030,
+        "vr" => "DS",
+        "type" => "string",
+        "default" => "",
+        "field" => "pixelSpacing"
+    ];
+    const bitsStored = [
+        "group" => 0x0028,
+        "element" => 0x0101,
+        "vr" => "US",
+        "type" => "string",
+        "default" => "",
+        "field" => "bitsStored"
+    ];
+    const highBit = [
+        "group" => 0x0028,
+        "element" => 0x0102,
+        "vr" => "DS",
+        "type" => "string",
+        "default" => "",
+        "field" => "highBit"
+    ];
+    const pixelRepresentation = [
+        "group" => 0x0028,
+        "element" => 0x0103,
+        "vr" => "DS",
+        "type" => "string",
+        "default" => "",
+        "field" => "pixelRepresentation"
+    ];
+    const windowCenter = [
+        "group" => 0x0028,
+        "element" => 0x1050,
+        "vr" => "DS",
+        "type" => "string",
+        "default" => "",
+        "field" => "windowCenter"
+    ];
+    const windowWidth = [
+        "group" => 0x0028,
+        "element" => 0x1051,
+        "vr" => "DS",
+        "type" => "string",
+        "default" => "",
+        "field" => "windowWidth"
+    ];
+    const rescaleIntercept = [
+        "group" => 0x0028,
+        "element" => 0x1052,
+        "vr" => "DS",
+        "type" => "string",
+        "default" => "",
+        "field" => "rescaleIntercept"
+    ];
+    const rescaleSlope = [
+        "group" => 0x0028,
+        "element" => 0x1053,
+        "vr" => "DS",
+        "type" => "string",
+        "default" => "",
+        "field" => "rescaleSlope"
+    ];
+    const rescaleType = [
+        "group" => 0x0028,
+        "element" => 0x1054,
+        "vr" => "DS",
+        "type" => "string",
+        "default" => "",
+        "field" => "rescaleType"
+    ];
+    const SOPInstanceUID = [
+        "group" => 0x0008,
+        "element" => 0x0018,
+        "vr" => "DS",
+        "type" => "string",
+        "default" => "",
+        "field" => "SOPInstanceUID"
+    ];
+    const numberOfFrames = [
+        "group" => 0x0028,
+        "element" => 0x0008,
+        "vr" => "IS",
+        "type" => "int",
+        "default" => 0,
+        "field" => "numberOfFrames"
+    ];
+}
+