1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042 |
- //ImageHeader.h
- #pragma once
- #define IMAGE_HEADER_LEN 16384 //16K
- #define FRAME_HEADER_LEN 4096 // 4K
- #define LEN_2 2
- #define LEN_4 4
- #define LEN_8 8 //DA
- #define LEN_12 12 //IS
- #define LEN_16 16 //DS
- #define LEN_26 26
- #define LEN_32 32
- #define LEN_64 64 //LO
- #define LEN_1024 1024
- //float //FL
- //对应结构在ECOM中所占的长度
- #define FileHeaderLength 64
- #define GeneralImageModuleLength 512
- #define ModalityImageModuleLength 512
- #define ImagePixelModuleLength 128
- #define DisplayShutterModuleLength 256
- #define XrayGenerationModuleLength 128
- #define XrayGridModuleLength 128
- #define XrayCollimatorModuleLength 256
- #define XrayFiltrationModuleLength 128
- #define ModalityDetectorModuleLength 512
- #define XrayDetectorModuleLength 32
- #define ModalityPositioningModuleLength 512
- #define XrayAcquisitionDoseModuleLength 512
- #define XrayTomographyAcquisitionModuleLength 256
- //1) 文件头
- // FileHeader
- #define FileHeaderOffset 0
- typedef struct tagFileHeader
- {
- char strVersion[LEN_16]; //ECOM文件的版本号
- char strVersionDescription[LEN_16]; //版本描述
- UINT nFileLength; //整个文件的大小
- UINT nFrameNumber; //图像总帧数
- UINT nFileType; //文件类型
- tagFileHeader()
- {
- ZeroMemory(strVersion, LEN_16);
- ZeroMemory(strVersionDescription, LEN_16);
- nFileLength = 0;
- nFrameNumber = 0;
- nFileType = 0;
- }
- tagFileHeader& operator= (const tagFileHeader& tfh)
- {
- strcpy_s(strVersion, LEN_16, tfh.strVersion);
- strcpy_s(strVersionDescription, LEN_16, tfh.strVersionDescription);
- nFileLength = tfh.nFileLength;
- nFrameNumber = tfh.nFrameNumber;
- nFileType = tfh.nFileType;
- return *this;
- }
- }FileHeader;
- // General Image Module
- #define GeneralImageModuleOffset (FileHeaderOffset+FileHeaderLength)
- typedef struct tagGeneralImageModule
- {
- char strInstanceNumber[LEN_12] ; //(0020,0013)
- char strPatientOrientation[LEN_16]; //(0020,0020)
- char strContentDate[LEN_8]; //(0008,0023)
- char strContentTime[LEN_16]; //(0008,0033)
- char strImageType[LEN_16]; //(0008,0008)
- char strAcquisitionNumber[LEN_12]; //(0020,0012)
- char strAcquisitionDate[LEN_8]; //(0008,0022)
- char strAcquisitionTime[LEN_16]; //(0008,0032)
- char strAcquisitionDatetime[LEN_26]; //(0008,002A)
- char strImagesinAcquisition[LEN_12]; // (0020,1002)
- char strQualityControlImage[LEN_16]; //(0028,0300)
- char strBurnedInAnnotation[LEN_16]; //(0028,0301)
- char strLossyImageCompression[LEN_16]; // (0028,2110)
- char strLossyImageCompressionRatio[LEN_16]; // (0028,2112)
- char strPresentationLUTShape[LEN_16]; // (2050,0020)
- tagGeneralImageModule()
- {
- ZeroMemory(strInstanceNumber, LEN_12) ;
- ZeroMemory(strPatientOrientation, LEN_16);
- ZeroMemory(strContentDate, LEN_8);
- ZeroMemory(strContentTime, LEN_16);
- ZeroMemory(strImageType, LEN_16);
- ZeroMemory(strAcquisitionNumber, LEN_12);
- ZeroMemory(strAcquisitionDate, LEN_8);
- ZeroMemory(strAcquisitionTime, LEN_16);
- ZeroMemory(strAcquisitionDatetime, LEN_26);
- ZeroMemory(strImagesinAcquisition, LEN_12);
- ZeroMemory(strQualityControlImage, LEN_16);
- ZeroMemory(strBurnedInAnnotation, LEN_16);
- ZeroMemory(strLossyImageCompression, LEN_16);
- ZeroMemory(strLossyImageCompressionRatio, LEN_16);
- ZeroMemory(strPresentationLUTShape, LEN_16);
- }
- tagGeneralImageModule& operator=(const tagGeneralImageModule& tgi)
- {
- strcpy_s(strInstanceNumber, LEN_12, tgi.strInstanceNumber) ;
- strcpy_s(strPatientOrientation, LEN_16, tgi.strPatientOrientation);
- strcpy_s(strContentDate, LEN_8, tgi.strContentDate);
- strcpy_s(strContentTime, LEN_16, tgi.strContentTime);
- strcpy_s(strImageType, LEN_16, tgi.strImageType);
- strcpy_s(strAcquisitionNumber, LEN_12, tgi.strAcquisitionNumber);
- strcpy_s(strAcquisitionDate, LEN_8, tgi.strAcquisitionDate);
- strcpy_s(strAcquisitionTime, LEN_16, tgi.strAcquisitionTime);
- strcpy_s(strAcquisitionDatetime, LEN_26, tgi.strAcquisitionDatetime);
- strcpy_s(strImagesinAcquisition, LEN_12, tgi.strImagesinAcquisition);
- strcpy_s(strQualityControlImage, LEN_16, tgi.strQualityControlImage);
- strcpy_s(strBurnedInAnnotation, LEN_16, tgi.strBurnedInAnnotation);
- strcpy_s(strLossyImageCompression, LEN_16, tgi.strLossyImageCompression);
- strcpy_s(strLossyImageCompressionRatio, LEN_16, tgi.strLossyImageCompressionRatio);
- strcpy_s(strPresentationLUTShape, LEN_16, tgi.strPresentationLUTShape);
- return *this;
- }
- }GeneralImageModule;
- //Image Pixel Module
- #define ImagePixelModuleOffset (GeneralImageModuleOffset+GeneralImageModuleLength)
- typedef struct tagImagePixelModule
- {
- unsigned short nSamplesperPixel; //(0028,0002)
- char strPhotometricInterpretation[LEN_16]; //(0028,0004)
- unsigned short Rows; //(0028,0010)
- unsigned short Columns; //(0028,0011)
- unsigned short BitsAllocated; //(0028,0100)
- unsigned short BitsStored; //(0028,0101)
- unsigned short HighBit; //(0028,0102)
- unsigned short PixelRepresentation; //(0028,0103)
- unsigned short PlanarConfiguration; //(0028,0006)
- char strPixelAspectRatio[LEN_12]; //(0028,0034)
- unsigned short SmallestImagePixelValue; //(0028,0106)
- unsigned short LargestImagePixelValue; //(0028,0107)
- tagImagePixelModule()
- {
- nSamplesperPixel = 0;
- ZeroMemory(strPhotometricInterpretation, LEN_16);
- Rows = 0;
- Columns = 0;
- BitsAllocated = 0;
- BitsStored = 0;
- HighBit = 0;
- PixelRepresentation = 0;
- PlanarConfiguration = 0xFF;
- ZeroMemory(strPixelAspectRatio, LEN_12);
- SmallestImagePixelValue = 0;
- LargestImagePixelValue = 0;
- }
- tagImagePixelModule& operator=(const tagImagePixelModule& tip)
- {
- nSamplesperPixel = tip.nSamplesperPixel;
- strcpy_s(strPhotometricInterpretation, LEN_16, tip.strPhotometricInterpretation);
- Rows = tip.Rows;
- Columns = tip.Columns;
- BitsAllocated = tip.BitsAllocated;
- BitsStored = tip.BitsStored;
- HighBit = tip.HighBit;
- PixelRepresentation = tip.PixelRepresentation;
- PlanarConfiguration = tip.PlanarConfiguration;
- strcpy_s(strPixelAspectRatio, LEN_12, tip.strPixelAspectRatio);
- SmallestImagePixelValue = tip.SmallestImagePixelValue;
- LargestImagePixelValue = tip.LargestImagePixelValue;
- return *this;
- }
- }ImagePixelModule;
- //DX Image Module -- ModalityImageModule General Image Module基础上加入一下信息:
- #define ModalityImageModuleOffset (ImagePixelModuleOffset+ImagePixelModuleLength)
- typedef struct tagModalityImageModule
- {
- unsigned short nPixelRepresentation; //(0028,0103)
- char strPixelIntensityRelationship[LEN_16]; //(0028,1040)
- signed short nPixelIntensityRelationshipSign; //(0028,1041)
- char strRescaleIntercept[LEN_16]; //(0028,1052)
- char strRescaleSlope[LEN_16]; //(0028,1053)
- char strRescaleType[LEN_64]; //(0028,1054)
- char strAcquisitionDeviceProcessingDescription[LEN_64]; //(0018,1400)
- char strAcquisitionDeviceProcessingCode[LEN_64]; //(0018,1401)
- char strCalibrationImage[LEN_16]; //(0050,0004)
- char strWindowCenter[LEN_16]; //(0028,1050)
- char strWindowWidth[LEN_16]; //(0028,1051)
- tagModalityImageModule()
- {
- nPixelRepresentation = 0;
- ZeroMemory(strPixelIntensityRelationship, LEN_16);
- nPixelIntensityRelationshipSign = 0;
- ZeroMemory(strRescaleIntercept, LEN_16);
- ZeroMemory(strRescaleSlope, LEN_16);
- ZeroMemory(strRescaleType, LEN_64);
- ZeroMemory(strAcquisitionDeviceProcessingDescription, LEN_64);
- ZeroMemory(strAcquisitionDeviceProcessingCode, LEN_64);
- ZeroMemory(strCalibrationImage, LEN_16);
- ZeroMemory(strWindowCenter, LEN_16);
- ZeroMemory(strWindowWidth, LEN_16);
- }
- tagModalityImageModule& operator=(const tagModalityImageModule& tmi)
- {
- nPixelRepresentation = tmi.nPixelRepresentation;
- strcpy_s(strPixelIntensityRelationship, LEN_16, tmi.strPixelIntensityRelationship);
- nPixelIntensityRelationshipSign = tmi.nPixelIntensityRelationshipSign;
- strcpy_s(strRescaleIntercept, LEN_16, tmi.strRescaleIntercept);
- strcpy_s(strRescaleSlope, LEN_16, tmi.strRescaleSlope);
- strcpy_s(strRescaleType, LEN_64, tmi.strRescaleType);
- strcpy_s(strAcquisitionDeviceProcessingDescription, LEN_64, tmi.strAcquisitionDeviceProcessingDescription);
- strcpy_s(strAcquisitionDeviceProcessingCode, LEN_64, tmi.strAcquisitionDeviceProcessingCode);
- strcpy_s(strCalibrationImage, LEN_16, tmi.strCalibrationImage);
- strcpy_s(strWindowCenter, LEN_16, tmi.strWindowCenter);
- strcpy_s(strWindowWidth, LEN_16, tmi.strWindowWidth);
- return *this;
- }
- }ModalityImageModule;
- //Display Shutter Module
- #define DisplayShutterModuleOffset (ModalityImageModuleOffset+ModalityImageModuleLength)
- typedef struct tagDisplayShutterModule
- {
- char strShutterShape[LEN_16]; //(0018,1600)
- char strShutterLeftVerticalEdge[LEN_12]; //(0018,1602)
- char strShutterRightVerticalEdge[LEN_12]; //(0018,1604)
- char strShutterUpperHorizontalEdge[LEN_12]; //(0018,1606)
- char strShutterLowerHorizontalEdge[LEN_12]; //(0018,1608)
- char strCenterofCircularShutter[LEN_12]; //(0018,1610)
- char strRadiusofCircularShutter[LEN_12]; //(0018,1612)
- char strVerticesofthePolygonalShutter[LEN_12]; //(0018,1620)
- unsigned short nShutterPresentationValue; //(0018,1622)
- tagDisplayShutterModule()
- {
- ZeroMemory(strShutterShape, LEN_16);
- ZeroMemory(strShutterLeftVerticalEdge, LEN_12);
- ZeroMemory(strShutterRightVerticalEdge, LEN_12);
- ZeroMemory(strShutterUpperHorizontalEdge, LEN_12);
- ZeroMemory(strShutterLowerHorizontalEdge, LEN_12);
- ZeroMemory(strCenterofCircularShutter, LEN_12);
- ZeroMemory(strRadiusofCircularShutter, LEN_12);
- ZeroMemory(strVerticesofthePolygonalShutter, LEN_12);
- nShutterPresentationValue = 0xFF;
- }
- tagDisplayShutterModule& operator=(const tagDisplayShutterModule& tds)
- {
- strcpy_s(strShutterShape, LEN_16, tds.strShutterShape);
- strcpy_s(strShutterLeftVerticalEdge, LEN_12, tds.strShutterLeftVerticalEdge);
- strcpy_s(strShutterRightVerticalEdge, LEN_12, tds.strShutterRightVerticalEdge);
- strcpy_s(strShutterUpperHorizontalEdge, LEN_12, tds.strShutterUpperHorizontalEdge);
- strcpy_s(strShutterLowerHorizontalEdge, LEN_12, tds.strShutterLowerHorizontalEdge);
- strcpy_s(strCenterofCircularShutter, LEN_12, tds.strCenterofCircularShutter);
- strcpy_s(strRadiusofCircularShutter, LEN_12, tds.strRadiusofCircularShutter);
- strcpy_s(strVerticesofthePolygonalShutter, LEN_12, tds.strVerticesofthePolygonalShutter);
- nShutterPresentationValue = tds.nShutterPresentationValue;
- return *this;
- }
- }DisplayShutterModule;
- //X-RAY GENERATION MODULE
- #define XrayGenerationModuleOffset (DisplayShutterModuleOffset+DisplayShutterModuleLength)
- typedef struct tagXrayGenerationModule
- {
- char strExposureControlMode[LEN_16]; //(0018,7060)
- char strExposureStatus[LEN_16]; //(0018,7064)
- char strPhototimerSetting[LEN_16]; //(0018,7065)
- char strFocalSpot[LEN_16]; //(0018,1190)
- tagXrayGenerationModule()
- {
- ZeroMemory(strExposureControlMode, LEN_16);
- ZeroMemory(strExposureStatus, LEN_16);
- ZeroMemory(strPhototimerSetting, LEN_16);
- ZeroMemory(strFocalSpot, LEN_16);
- }
- tagXrayGenerationModule& operator=(const tagXrayGenerationModule& txg)
- {
- strcpy_s(strExposureControlMode, LEN_16, txg.strExposureControlMode);
- strcpy_s(strExposureStatus, LEN_16, txg.strExposureStatus);
- strcpy_s(strPhototimerSetting, LEN_16, txg.strPhototimerSetting);
- strcpy_s(strFocalSpot, LEN_16, txg.strFocalSpot);
- return *this;
- }
- }XrayGenerationModule;
- //X-Ray Grid Module
- #define XrayGridModuleOffset (XrayGenerationModuleOffset+XrayGenerationModuleLength)
- typedef struct tagXrayGridModule
- {
- char strGrid[LEN_16]; //(0018,1166)
- char strGridThickness[LEN_16]; //(0018,7042)
- char strGridPitch[LEN_16]; //(0018,7044)
- char strGridAspectRatio[LEN_12]; //(0018,7046)
- char strGridPeriod[LEN_16]; //(0018,7048)
- char strGridFocalDistance[LEN_16]; //(0018,704C)
- tagXrayGridModule()
- {
- ZeroMemory(strGrid, LEN_16);
- ZeroMemory(strGridThickness, LEN_16);
- ZeroMemory(strGridPitch, LEN_16);
- ZeroMemory(strGridAspectRatio, LEN_12);
- ZeroMemory(strGridPeriod, LEN_16);
- ZeroMemory(strGridFocalDistance, LEN_16);
- }
- tagXrayGridModule& operator=(const tagXrayGridModule& txg)
- {
- strcpy_s(strGrid, LEN_16, txg.strGrid);
- strcpy_s(strGridThickness, LEN_16, txg.strGridThickness);
- strcpy_s(strGridPitch, LEN_16, txg.strGridPitch);
- strcpy_s(strGridAspectRatio, LEN_12, txg.strGridAspectRatio);
- strcpy_s(strGridPeriod, LEN_16, txg.strGridPeriod);
- strcpy_s(strGridFocalDistance, LEN_16, txg.strGridFocalDistance);
- return *this;
- }
- }XrayGridModule;
- //X-Ray Collimator attributes
- #define XrayCollimatorModuleOffset (XrayGridModuleOffset+XrayGridModuleLength)
- typedef struct tagXrayCollimatorModule
- {
- char strCollimatorShape[LEN_16]; //(0018,1700)
- char strCollimatorLeftVerticalEdge[LEN_12]; //(0018,1702)
- char strCollimatorRightVerticalEdge[LEN_12]; //(0018,1704)
- char strCollimatorUpperHorizontalEdge[LEN_12]; //(0018,1706)
- char strCollimatorLowerHorizontalEdge[LEN_12]; //(0018,1708)
- char strCenterofCircularCollimator[LEN_12]; //(0018,1710)
- char strRadiusofCircularCollimator[LEN_12]; //(0018,1712)
- char strVerticesofthePolygonalCollimator[LEN_12]; //(0018,1720)
- tagXrayCollimatorModule()
- {
- ZeroMemory(strCollimatorShape, LEN_16);
- ZeroMemory(strCollimatorLeftVerticalEdge, LEN_12);
- ZeroMemory(strCollimatorRightVerticalEdge, LEN_12);
- ZeroMemory(strCollimatorUpperHorizontalEdge, LEN_12);
- ZeroMemory(strCollimatorLowerHorizontalEdge, LEN_12);
- ZeroMemory(strCenterofCircularCollimator, LEN_12);
- ZeroMemory(strRadiusofCircularCollimator, LEN_12);
- ZeroMemory(strVerticesofthePolygonalCollimator, LEN_12);
- }
- tagXrayCollimatorModule& operator=(const tagXrayCollimatorModule& txc)
- {
- strcpy_s(strCollimatorShape, LEN_16, txc.strCollimatorShape);
- strcpy_s(strCollimatorLeftVerticalEdge, LEN_12, txc.strCollimatorLeftVerticalEdge);
- strcpy_s(strCollimatorRightVerticalEdge, LEN_12, txc.strCollimatorRightVerticalEdge);
- strcpy_s(strCollimatorUpperHorizontalEdge, LEN_12, txc.strCollimatorUpperHorizontalEdge);
- strcpy_s(strCollimatorLowerHorizontalEdge, LEN_12, txc.strCollimatorLowerHorizontalEdge);
- strcpy_s(strCenterofCircularCollimator, LEN_12, txc.strCenterofCircularCollimator);
- strcpy_s(strRadiusofCircularCollimator, LEN_12, txc.strRadiusofCircularCollimator);
- strcpy_s(strVerticesofthePolygonalCollimator, LEN_12, txc.strVerticesofthePolygonalCollimator);
- return *this;
- }
- }XrayCollimatorModule;
- //X-Ray Filtration Module
- #define XrayFiltrationModuleOffset (XrayCollimatorModuleOffset+XrayCollimatorModuleLength)
- typedef struct tagXrayFiltrationModule
- {
- char strFilterType[LEN_16]; //(0018,1160)
- char strFilterMaterial[LEN_16]; //(0018,7050)
- char strFilterThicknessMinimum[LEN_16]; //(0018,7052)
- char strFilterThicknessMaximum[LEN_16]; //(0018,7054)
- tagXrayFiltrationModule()
- {
- ZeroMemory(strFilterType, LEN_16);
- ZeroMemory(strFilterMaterial, LEN_16);
- ZeroMemory(strFilterThicknessMinimum, LEN_16);
- ZeroMemory(strFilterThicknessMaximum, LEN_16);
- }
- tagXrayFiltrationModule& operator=(const tagXrayFiltrationModule& txf)
- {
- strcpy_s(strFilterType, LEN_16, txf.strFilterType);
- strcpy_s(strFilterMaterial, LEN_16, txf.strFilterMaterial);
- strcpy_s(strFilterThicknessMinimum, LEN_16, txf.strFilterThicknessMinimum);
- strcpy_s(strFilterThicknessMaximum, LEN_16, txf.strFilterThicknessMaximum);
- return *this;
- }
- }XrayFiltrationModule;
- //DX Detector Module - ModalityDetectorModule
- #define ModalityDetectorModuleOffset (XrayFiltrationModuleOffset+XrayFiltrationModuleLength)
- typedef struct tagModalityDetectorModule
- {
- char strDetectorActiveTime[LEN_16]; //(0018,7014)
- char strDetectorActivationOffsetFromExposure[LEN_16]; //(0018,7016)
- char strFieldofViewShape[LEN_16]; //(0018,1147)
- char strFieldofViewDimension[LEN_12]; //(0018,1149)
- char strFieldofViewOrigin[LEN_16]; //(0018,7030)
- char strFieldofViewRotation[LEN_16]; //(0018,7032) -- 0, 90, 180, 270
- char strFieldofViewHorizontalFlip[LEN_16]; //(0018,7034)
- char strImagerPixelSpacing[LEN_16]; //(0018,1164)
- char strDetectorType[LEN_16]; //(0018,7004)
- char strDetectorConfiguration[LEN_16]; //(0018,7005) – AREA, SLOT
- char strDetectorID[LEN_16]; //(0018,700A)
- char strDateofLastDetectorCalibration[LEN_8]; //(0018,700C)
- char strTimeofLastDetectorCalibration[LEN_16]; //(0018,700E)
- char strExposuresonDetectorSinceLastCalibration[LEN_12]; //(0018,7010)
- char strExposuresonDetectorSinceManufactured[LEN_12]; //(0018,7011)
- char strDetectorTimeSinceLastExposure[LEN_16]; //(0018,7012)
- char strDetectorBinning[LEN_16]; //(0018,701A)
- char strDetectorConditionsNominalFlag[LEN_16]; //(0018,7000)
- char strDetectorTemperature[LEN_16]; //(0018,7001)
- char strSensitivity[LEN_16]; //(0018,6000)
- char strDetectorElementPhysicalSize[LEN_16]; //(0018,7020)
- char strDetectorElementSpacing[LEN_16]; //(0018,7022)
- char strDetectorActiveShape[LEN_16]; //(0018,7024)
- char strDetectorActiveDimension[LEN_16]; //(0018,7026)
- char strDetectorActiveOrigin[LEN_16]; //(0018,7028)
- tagModalityDetectorModule()
- {
- ZeroMemory(strDetectorActiveTime, LEN_16);
- ZeroMemory(strDetectorActivationOffsetFromExposure, LEN_16);
- ZeroMemory(strFieldofViewShape, LEN_16);
- ZeroMemory(strFieldofViewDimension, LEN_12);
- ZeroMemory(strFieldofViewOrigin, LEN_16);
- ZeroMemory(strFieldofViewRotation, LEN_16);
- ZeroMemory(strFieldofViewHorizontalFlip, LEN_16);
- ZeroMemory(strImagerPixelSpacing, LEN_16);
- ZeroMemory(strDetectorType, LEN_16);
- ZeroMemory(strDetectorConfiguration, LEN_16);
- ZeroMemory(strDetectorID, LEN_16);
- ZeroMemory(strDateofLastDetectorCalibration, LEN_8);
- ZeroMemory(strTimeofLastDetectorCalibration, LEN_16);
- ZeroMemory(strExposuresonDetectorSinceLastCalibration, LEN_12);
- ZeroMemory(strExposuresonDetectorSinceManufactured, LEN_12);
- ZeroMemory(strDetectorTimeSinceLastExposure, LEN_16);
- ZeroMemory(strDetectorBinning, LEN_16);
- ZeroMemory(strDetectorConditionsNominalFlag, LEN_16);
- ZeroMemory(strDetectorTemperature, LEN_16);
- ZeroMemory(strSensitivity, LEN_16);
- ZeroMemory(strDetectorElementPhysicalSize, LEN_16);
- ZeroMemory(strDetectorElementSpacing, LEN_16);
- ZeroMemory(strDetectorActiveShape, LEN_16);
- ZeroMemory(strDetectorActiveDimension, LEN_16);
- ZeroMemory(strDetectorActiveOrigin, LEN_16);
- }
- tagModalityDetectorModule& operator=(const tagModalityDetectorModule& tmd)
- {
- strcpy_s(strDetectorActiveTime, LEN_16, tmd.strDetectorActiveTime);
- strcpy_s(strDetectorActivationOffsetFromExposure, LEN_16, tmd.strDetectorActivationOffsetFromExposure);
- strcpy_s(strFieldofViewShape, LEN_16, tmd.strFieldofViewShape);
- strcpy_s(strFieldofViewDimension, LEN_12, tmd.strFieldofViewDimension);
- strcpy_s(strFieldofViewOrigin, LEN_16, tmd.strFieldofViewOrigin);
- strcpy_s(strFieldofViewRotation, LEN_16, tmd.strFieldofViewRotation);
- strcpy_s(strFieldofViewHorizontalFlip, LEN_16, tmd.strFieldofViewHorizontalFlip);
- strcpy_s(strImagerPixelSpacing, LEN_16, tmd.strImagerPixelSpacing);
- strcpy_s(strDetectorType, LEN_16, tmd.strDetectorType);
- strcpy_s(strDetectorConfiguration, LEN_16, tmd.strDetectorConfiguration);
- strcpy_s(strDetectorID, LEN_16, tmd.strDetectorID);
- strcpy_s(strDateofLastDetectorCalibration, LEN_8, tmd.strDateofLastDetectorCalibration);
- strcpy_s(strTimeofLastDetectorCalibration, LEN_16, tmd.strTimeofLastDetectorCalibration);
- strcpy_s(strExposuresonDetectorSinceLastCalibration, LEN_12, tmd.strExposuresonDetectorSinceLastCalibration);
- strcpy_s(strExposuresonDetectorSinceManufactured, LEN_12, tmd.strExposuresonDetectorSinceManufactured);
- strcpy_s(strDetectorTimeSinceLastExposure, LEN_16, tmd.strDetectorTimeSinceLastExposure);
- strcpy_s(strDetectorBinning, LEN_16, tmd.strDetectorBinning);
- strcpy_s(strDetectorConditionsNominalFlag, LEN_16, tmd.strDetectorConditionsNominalFlag);
- strcpy_s(strDetectorTemperature, LEN_16, tmd.strDetectorTemperature);
- strcpy_s(strSensitivity, LEN_16, tmd.strSensitivity);
- strcpy_s(strDetectorElementPhysicalSize, LEN_16, tmd.strDetectorElementPhysicalSize);
- strcpy_s(strDetectorElementSpacing, LEN_16, tmd.strDetectorElementSpacing);
- strcpy_s(strDetectorActiveShape, LEN_16, tmd.strDetectorActiveShape);
- strcpy_s(strDetectorActiveDimension, LEN_16, tmd.strDetectorActiveDimension);
- strcpy_s(strDetectorActiveOrigin, LEN_16, tmd.strDetectorActiveOrigin);
- return *this;
- }
- }ModalityDetectorModule;
- //X-Ray Detector Module
- #define XrayDetectorModuleOffset (ModalityDetectorModuleOffset+ModalityDetectorModuleLength)
- typedef struct tagXrayDetectorModule
- {
- float fPhysicalDetectorSize; //(0018,9429)
- float fPositionofIsocenterProjection; //(0018,9430)
- tagXrayDetectorModule()
- {
- fPhysicalDetectorSize = 0;
- fPositionofIsocenterProjection = 0;
- }
- tagXrayDetectorModule& operator=(const tagXrayDetectorModule& txd)
- {
- fPhysicalDetectorSize = txd.fPhysicalDetectorSize;
- fPositionofIsocenterProjection = txd.fPositionofIsocenterProjection;
- return *this;
- }
- }XrayDetectorModule;
- //DX Positioning Module - ModalityPositioningModule
- #define ModalityPositioningModuleOffset (XrayDetectorModuleOffset+XrayDetectorModuleLength)
- typedef struct tagModalityPositioningModule
- {
- char strPatientPosition[LEN_16]; //(0018,5100)
- char strViewPosition[LEN_16]; //(0018,5101)
- char strDistanceSourcetoPatient[LEN_16]; //(0018,1111)
- char strDistanceSourcetoDetector[LEN_16]; //(0018,1110)
- char strEstimatedRadiographicMagnificationFactor[LEN_16]; //(0018,1114)
- char strPositionerType[LEN_16]; //(0018,1508)
- char strPositionerPrimaryAngle[LEN_16]; //(0018,1510)
- char strPositionerSecondaryAngle[LEN_16]; //(0018,1511)
- char strDetectorPrimaryAngle[LEN_16]; //(0018,1530)
- char strDetectorSecondaryAngle[LEN_16]; //(0018,1531)
- char strColumnAngulation[LEN_16]; //(0018,1450)
- char strTableType[LEN_16]; //(0018,113A)
- char strTableAngle[LEN_16]; //(0018,1138)
- char strBodyPartThickness[LEN_16]; //(0018,11A0)
- char strCompressionForce[LEN_16]; //(0018,11A2)
- char strOrganExposed[LEN_16]; //(0040,0318)
- char strBreastImplantPresent[LEN_16]; //(0028,1300)
- tagModalityPositioningModule()
- {
- ZeroMemory(strPatientPosition, LEN_16);
- ZeroMemory(strViewPosition, LEN_16);
- ZeroMemory(strDistanceSourcetoPatient, LEN_16);
- ZeroMemory(strDistanceSourcetoDetector, LEN_16);
- ZeroMemory(strEstimatedRadiographicMagnificationFactor, LEN_16);
- ZeroMemory(strPositionerType, LEN_16);
- ZeroMemory(strPositionerPrimaryAngle, LEN_16);
- ZeroMemory(strPositionerSecondaryAngle, LEN_16);
- ZeroMemory(strDetectorPrimaryAngle, LEN_16);
- ZeroMemory(strDetectorSecondaryAngle, LEN_16);
- ZeroMemory(strColumnAngulation, LEN_16);
- ZeroMemory(strTableType, LEN_16);
- ZeroMemory(strTableAngle, LEN_16);
- ZeroMemory(strBodyPartThickness, LEN_16);
- ZeroMemory(strCompressionForce, LEN_16);
- ZeroMemory(strOrganExposed, LEN_16);
- ZeroMemory(strBreastImplantPresent, LEN_16);
- }
- tagModalityPositioningModule& operator=(const tagModalityPositioningModule& tmp)
- {
- strcpy_s(strPatientPosition, LEN_16, tmp.strPatientPosition);
- strcpy_s(strViewPosition, LEN_16, tmp.strViewPosition);
- strcpy_s(strDistanceSourcetoPatient, LEN_16, tmp.strDistanceSourcetoPatient);
- strcpy_s(strDistanceSourcetoDetector, LEN_16, tmp.strDistanceSourcetoDetector);
- strcpy_s(strEstimatedRadiographicMagnificationFactor, LEN_16, tmp.strEstimatedRadiographicMagnificationFactor);
- strcpy_s(strPositionerType, LEN_16, tmp.strPositionerType);
- strcpy_s(strPositionerPrimaryAngle, LEN_16, tmp.strPositionerPrimaryAngle);
- strcpy_s(strPositionerSecondaryAngle, LEN_16, tmp.strPositionerSecondaryAngle);
- strcpy_s(strDetectorPrimaryAngle, LEN_16, tmp.strDetectorPrimaryAngle);
- strcpy_s(strDetectorSecondaryAngle, LEN_16, tmp.strDetectorSecondaryAngle);
- strcpy_s(strColumnAngulation, LEN_16, tmp.strColumnAngulation);
- strcpy_s(strTableType, LEN_16, tmp.strTableType);
- strcpy_s(strTableAngle, LEN_16, tmp.strTableAngle);
- strcpy_s(strBodyPartThickness, LEN_16, tmp.strBodyPartThickness);
- strcpy_s(strCompressionForce, LEN_16, tmp.strCompressionForce);
- strcpy_s(strOrganExposed, LEN_16, tmp.strOrganExposed);
- strcpy_s(strBreastImplantPresent, LEN_16, tmp.strBreastImplantPresent);
- return *this;
- }
- }ModalityPositioningModule;
- //X-Ray Acquisition Dose Module
- #define XrayAcquisitionDoseModuleOffset (ModalityPositioningModuleOffset+ModalityPositioningModuleLength)
- typedef struct tagXrayAcquisitionDoseModule
- {
- char strKVP[LEN_16]; //(0018,0060)
- char strXRayTubeCurrent[LEN_12]; //(0018,1151)
- char strXRayTubeCurrentinuA[LEN_16]; //(0018,8151)
- char strExposureTime[LEN_12]; //(0018,1150)
- char strExposureTimeinuS[LEN_16]; //(0018,8150)
- char strExposure[LEN_12]; //(0018,1152)
- char strExposureinuAs[LEN_12]; //(0018,1153)
- char strImageAreaDoseProduct[LEN_16]; //(0018,115E)
- char strRelativeXRayExposure[LEN_12]; //(0018,1405)
- unsigned short nEntranceDose; //(0040,0302)
- char strEntranceDoseinmGy[LEN_16]; //(0040,8302)
- unsigned short nExposedArea; //(0040,0303)
- char strDistanceSourcetoEntrance[LEN_16]; //(0040,0306)
- char strXRayOutput[LEN_16]; //(0040,0312)
- char strHalfValueLayer[LEN_16]; //(0040,0314)
- char strOrganDose[LEN_16]; //(0040,0316)
- char strAnodeTargetMaterial[LEN_16]; //(0018,1191)
- char strRectificationType[LEN_16]; //(0018,1156)
- tagXrayAcquisitionDoseModule()
- {
- ZeroMemory(strKVP, LEN_16);
- ZeroMemory(strXRayTubeCurrent, LEN_12);
- ZeroMemory(strXRayTubeCurrentinuA, LEN_16);
- ZeroMemory(strExposureTime, LEN_12);
- ZeroMemory(strExposureTimeinuS, LEN_16);
- ZeroMemory(strExposure, LEN_12);
- ZeroMemory(strExposureinuAs, LEN_12);
- ZeroMemory(strImageAreaDoseProduct, LEN_16);
- ZeroMemory(strRelativeXRayExposure, LEN_12);
- nEntranceDose = 0;
- ZeroMemory(strEntranceDoseinmGy, LEN_16);
- nExposedArea = 0;
- ZeroMemory(strDistanceSourcetoEntrance, LEN_16);
- ZeroMemory(strXRayOutput, LEN_16);
- ZeroMemory(strHalfValueLayer, LEN_16);
- ZeroMemory(strOrganDose, LEN_16);
- ZeroMemory(strAnodeTargetMaterial, LEN_16);
- ZeroMemory(strRectificationType, LEN_16);
- }
- tagXrayAcquisitionDoseModule& operator=(const tagXrayAcquisitionDoseModule& txa)
- {
- strcpy_s(strKVP, LEN_16, txa.strKVP);
- strcpy_s(strXRayTubeCurrent, LEN_12, txa.strXRayTubeCurrent);
- strcpy_s(strXRayTubeCurrentinuA, LEN_16, txa.strXRayTubeCurrentinuA);
- strcpy_s(strExposureTime, LEN_12, txa.strExposureTime);
- strcpy_s(strExposureTimeinuS, LEN_16, txa.strExposureTimeinuS);
- strcpy_s(strExposure, LEN_12, txa.strExposure);
- strcpy_s(strExposureinuAs, LEN_12, txa.strExposureinuAs);
- strcpy_s(strImageAreaDoseProduct, LEN_16, txa.strImageAreaDoseProduct);
- strcpy_s(strRelativeXRayExposure, LEN_12, txa.strRelativeXRayExposure);
- nEntranceDose = txa.nEntranceDose;
- strcpy_s(strEntranceDoseinmGy, LEN_16, txa.strEntranceDoseinmGy);
- nExposedArea = txa.nExposedArea;
- strcpy_s(strDistanceSourcetoEntrance, LEN_16, txa.strDistanceSourcetoEntrance);
- strcpy_s(strXRayOutput, LEN_16, txa.strXRayOutput);
- strcpy_s(strHalfValueLayer, LEN_16, txa.strHalfValueLayer);
- strcpy_s(strOrganDose, LEN_16, txa.strOrganDose);
- strcpy_s(strAnodeTargetMaterial, LEN_16, txa.strAnodeTargetMaterial);
- strcpy_s(strRectificationType, LEN_16, txa.strRectificationType);
- return *this;
- }
- }XrayAcquisitionDoseModule;
- //X-Ray Tomography Acquisition Module
- #define XrayTomographyAcquisitionModuleOffset (XrayAcquisitionDoseModuleOffset+XrayAcquisitionDoseModuleLength)
- typedef struct tagXrayTomographyAcquisitionModule
- {
- char strTomoLayerHeight[LEN_16]; //(0018,1460)
- char strTomoAngle[LEN_16]; //(0018,1470)
- char strTomoTime[LEN_16]; //(0018,1480)
- char strTomoType[LEN_16]; //(0018,1490)
- char strTomoClass[LEN_16]; //(0018,1491)
- char strNumberofTomosynthesis[LEN_12]; //(0018,1495)
- tagXrayTomographyAcquisitionModule()
- {
- ZeroMemory(strTomoLayerHeight, LEN_16);
- ZeroMemory(strTomoAngle, LEN_16);
- ZeroMemory(strTomoTime, LEN_16);
- ZeroMemory(strTomoType, LEN_16);
- ZeroMemory(strTomoClass, LEN_16);
- ZeroMemory(strNumberofTomosynthesis, LEN_12);
- }
- tagXrayTomographyAcquisitionModule& operator=(const tagXrayTomographyAcquisitionModule& txta)
- {
- strcpy_s(strTomoLayerHeight, LEN_16, txta.strTomoLayerHeight);
- strcpy_s(strTomoAngle, LEN_16, txta.strTomoAngle);
- strcpy_s(strTomoTime, LEN_16, txta.strTomoTime);
- strcpy_s(strTomoType, LEN_16, txta.strTomoType);
- strcpy_s(strTomoClass, LEN_16, txta.strTomoClass);
- strcpy_s(strNumberofTomosynthesis, LEN_12, txta.strNumberofTomosynthesis);
- return *this;
- }
- }XrayTomographyAcquisitionModule;
- //Overlay plane module
- //UINT nOffset;
- typedef struct tagOverlayplaneModule
- {
- unsigned short nOverlayRows; //(60xx,0010)
- unsigned short nOverlayColumns; //(60xx,0011)
- char strOverlayType[LEN_16]; //(60xx,0040)
- signed short nOverlayOrigin; //(60xx,0050)
- unsigned short nOverlayBitsAllocated; //(60xx,0100)
- unsigned short nOverlayBitPosition; //(60xx,0102)
- char strROIArea[LEN_12]; //(60xx,1301)
- char strROIMean[LEN_16]; //(60xx,1302)
- char strROIStandardDeviation[LEN_16]; //(60xx,1303)
- tagOverlayplaneModule()
- {
- nOverlayRows = 0;
- nOverlayColumns = 0;
- ZeroMemory(strOverlayType, LEN_16);
- nOverlayOrigin = 0;
- nOverlayBitsAllocated = 0;
- nOverlayBitPosition = 0;
- ZeroMemory(strROIArea, LEN_12);
- ZeroMemory(strROIMean, LEN_16);
- ZeroMemory(strROIStandardDeviation, LEN_16);
- }
- tagOverlayplaneModule& operator=(const tagOverlayplaneModule& top)
- {
- nOverlayRows = top.nOverlayRows;
- nOverlayColumns = top.nOverlayColumns;
- strcpy_s(strOverlayType, LEN_16, top.strOverlayType);
- nOverlayOrigin = top.nOverlayOrigin;
- nOverlayBitsAllocated = top.nOverlayBitsAllocated;
- nOverlayBitPosition = top.nOverlayBitPosition;
- strcpy_s(strROIArea, LEN_12, top.strROIArea);
- strcpy_s(strROIMean, LEN_16, top.strROIMean);
- strcpy_s(strROIStandardDeviation, LEN_16, top.strROIStandardDeviation);
- return *this;
- }
- }OverlayplaneModule;
- typedef struct tagImageHeader
- {
- FileHeader stFileHeader;
- GeneralImageModule stGeneralImageModule;
- ImagePixelModule stImagePixelModule;
- ModalityImageModule stModalityImageModule;
- DisplayShutterModule stDisplayShutterModule;
- XrayGenerationModule stXrayGenerationModule;
- XrayGridModule stXrayGridModule;
- XrayCollimatorModule stXrayCollimatorModule;
- XrayFiltrationModule stXrayFiltrationModule;
- ModalityDetectorModule stModalityDetectorModule;
- XrayDetectorModule stXrayDetectorModule;
- ModalityPositioningModule stModalityPositioningModule;
- XrayAcquisitionDoseModule stXrayAcquisitionDoseModule;
- XrayTomographyAcquisitionModule stXrayTomographyAcquisitionModule;
- tagImageHeader& operator=(const tagImageHeader& tih)
- {
- stFileHeader = tih.stFileHeader;
- stGeneralImageModule = tih.stGeneralImageModule;
- stImagePixelModule = tih.stImagePixelModule;
- stModalityImageModule = tih.stModalityImageModule;
- stDisplayShutterModule = tih.stDisplayShutterModule;
- stXrayGenerationModule = tih.stXrayGenerationModule;
- stXrayGridModule = tih.stXrayGridModule;
- stXrayCollimatorModule = tih.stXrayCollimatorModule;
- stXrayFiltrationModule = tih.stXrayFiltrationModule;
- stModalityDetectorModule = tih.stModalityDetectorModule;
- stXrayDetectorModule = tih.stXrayDetectorModule;
- stModalityPositioningModule = tih.stModalityPositioningModule;
- stXrayAcquisitionDoseModule = tih.stXrayAcquisitionDoseModule;
- stXrayTomographyAcquisitionModule = tih.stXrayTomographyAcquisitionModule;
- return *this;
- }
- }IMAGE_HEADER;
- //===========================================================================================================
- #define GenInfoLength 256
- #define FpdInfoLength 256
- #define TomoInfoLength 256
- #define MaskInfoLength 128
- #define PositionInfoLength 256
- #define CollimatorInfoLength 128
- #define FrameHeaderOffset 0
- typedef struct tagFrameGenInfo
- {
- char strKVP[LEN_16]; //KV
- char strXRayTubeCurrent[LEN_16]; //MA
- char strExposureTime[LEN_16]; //MS
- char strMAS[LEN_16];
- char strAECDensity[LEN_16];
- char strAECFilm[LEN_16];
- char strAECField[LEN_16];
- char strTechMode[LEN_16];
- char strFocusSpot[LEN_16]; // Focus
- tagFrameGenInfo()
- {
- ZeroMemory(strKVP, LEN_16);
- ZeroMemory(strXRayTubeCurrent, LEN_16);
- ZeroMemory(strExposureTime, LEN_16);
- ZeroMemory(strMAS, LEN_16);
- ZeroMemory(strAECDensity, LEN_16);
- ZeroMemory(strAECFilm, LEN_16);
- ZeroMemory(strAECField, LEN_16);
- ZeroMemory(strTechMode, LEN_16);
- ZeroMemory(strFocusSpot, LEN_16);
- }
- tagFrameGenInfo& operator=(const tagFrameGenInfo& tgi)
- {
- strcpy_s(strKVP, LEN_16, tgi.strKVP);
- strcpy_s(strXRayTubeCurrent, LEN_16, tgi.strXRayTubeCurrent);
- strcpy_s(strExposureTime, LEN_16, tgi.strExposureTime);
- strcpy_s(strMAS, LEN_16, tgi.strMAS);
- strcpy_s(strAECDensity, LEN_16, tgi.strAECDensity);
- strcpy_s(strAECFilm, LEN_16, tgi.strAECFilm);
- strcpy_s(strAECField, LEN_16, tgi.strAECField);
- strcpy_s(strTechMode, LEN_16, tgi.strTechMode);
- strcpy_s(strFocusSpot, LEN_16, tgi.strFocusSpot);
- return *this;
- }
- }FrameGenInfo;
- #define FPDInfoOffset FrameHeaderOffset + GenInfoLength //256
- typedef struct tagFrameFPDInfo
- {
- unsigned short nImageWidth; // 非DICOM
- unsigned short nImageHeight; // 非DICOM
- unsigned short nImageBits; // 非DICOM
- float fImageCurrentUgy; //DICOM
- float fImageReferUgy;
- float fImageDI;
- float fFPDTemperature;
- tagFrameFPDInfo()
- {
- nImageWidth = 0;
- nImageHeight = 0;
- nImageBits = 0;
- fImageCurrentUgy = 0.0;
- fImageReferUgy = 0.0;
- fImageDI = 0.0;
- fFPDTemperature = 0.0;
- }
- tagFrameFPDInfo& operator= (const tagFrameFPDInfo& tfi)
- {//
- nImageWidth = tfi.nImageWidth;
- nImageHeight = tfi.nImageHeight;
- nImageBits = tfi.nImageBits;
- fImageCurrentUgy = tfi.fImageCurrentUgy;
- fImageReferUgy = tfi.fImageReferUgy;
- fImageDI = tfi.fImageDI;
- fFPDTemperature = tfi.fFPDTemperature;
- return *this;
- }
- }FrameFPDInfo;
- #define TomoInfoOffset FPDInfoOffset + FpdInfoLength // 512
- typedef struct tagFrameTomoInfo
- {
- char strTomoAngle[LEN_16]; //在曝光过程中,光源(球馆)扫过的角度 DICOM
- char strTomoTime[LEN_16]; //在曝光过程中,光源(球馆)旋转重用的时间,单位S DICOM
- tagFrameTomoInfo()
- {
- ZeroMemory(strTomoAngle, LEN_16);
- ZeroMemory(strTomoTime, LEN_16);
- }
- tagFrameTomoInfo& operator=(const tagFrameTomoInfo& txta)
- {
- strcpy_s(strTomoAngle, LEN_16, txta.strTomoAngle);
- strcpy_s(strTomoTime, LEN_16, txta.strTomoTime);
- return *this;
- }
- }FrameTomoInfo;
- #define ImageMaskInfoOffset TomoInfoOffset + TomoInfoLength // 768
- #define MASK_NODE_NUM 10
- typedef struct tagFrameMaskInfo //非DICOM
- {
- UINT nNodes; //输入遮光器类型0为矩形,1为原型,2为六边形;
- UINT nNodeX[MASK_NODE_NUM]; //左上角横坐标;
- UINT nNodeY[MASK_NODE_NUM]; //左上角纵坐标;
- tagFrameMaskInfo()
- {
- ZeroMemory(this,sizeof(tagFrameMaskInfo));
- }
- tagFrameMaskInfo& operator= (const tagFrameMaskInfo& tmi)
- {//
- memcpy(this,&tmi,sizeof(tagFrameMaskInfo) );
- return *this;
- }
- }FrameMaskInfo;
- #define PositionInfoOffset ImageMaskInfoOffset + MaskInfoLength // 896
- typedef struct tagPositionInfo // DICOM
- {
- char strDistanceSourcetoPatient[LEN_16]; //SOD Object
- char strDistanceSourcetoDetector[LEN_16]; //SID Imager
- char strPositionerPrimaryAngle[LEN_16]; //见DICOM
- char strPositionerSecondaryAngle[LEN_16]; //见DICOM
- char strDetectorPrimaryAngle[LEN_16]; //见DICOM
- char strDetectorSecondaryAngle[LEN_16]; //见DICOM
- char strCompressionForce[LEN_16]; //压迫器的压迫力度
- tagPositionInfo()
- {
- ZeroMemory(strDistanceSourcetoPatient, LEN_16);
- ZeroMemory(strDistanceSourcetoDetector, LEN_16);
- ZeroMemory(strPositionerPrimaryAngle, LEN_16);
- ZeroMemory(strPositionerSecondaryAngle, LEN_16);
- ZeroMemory(strDetectorPrimaryAngle, LEN_16);
- ZeroMemory(strDetectorSecondaryAngle, LEN_16);
- ZeroMemory(strCompressionForce, LEN_16);
- }
- tagPositionInfo& operator=(const tagPositionInfo& tmp)
- {
- strcpy_s(strDistanceSourcetoPatient, LEN_16, tmp.strDistanceSourcetoPatient);
- strcpy_s(strDistanceSourcetoDetector, LEN_16, tmp.strDistanceSourcetoDetector);
- strcpy_s(strPositionerPrimaryAngle, LEN_16, tmp.strPositionerPrimaryAngle);
- strcpy_s(strPositionerSecondaryAngle, LEN_16, tmp.strPositionerSecondaryAngle);
- strcpy_s(strDetectorPrimaryAngle, LEN_16, tmp.strDetectorPrimaryAngle);
- strcpy_s(strDetectorSecondaryAngle, LEN_16, tmp.strDetectorSecondaryAngle);
- strcpy_s(strCompressionForce, LEN_16, tmp.strCompressionForce);
- return *this;
- }
- }PositionInfo;
- #define CollimatorInfoOffset (PositionInfoOffset + PositionInfoLength)
- typedef struct tagCollimatorInfo
- {
- UINT nCollimatorShape;
- UINT nCollimatorLeftVerticalEdge;
- UINT nCollimatorRightVerticalEdge;
- UINT nCollimatorUpperHorizontalEdge;
- UINT nCollimatorLowerHorizontalEdge;
- UINT nCenterofCircularCollimator;
- UINT nRadiusofCircularCollimator;
- UINT nVerticesofthePolygonalCollimator;
- tagCollimatorInfo()
- {
- nCollimatorShape = 0;
- nCollimatorLeftVerticalEdge = 0;
- nCollimatorRightVerticalEdge = 0;
- nCollimatorUpperHorizontalEdge = 0;
- nCollimatorLowerHorizontalEdge = 0;
- nCenterofCircularCollimator = 0;
- nRadiusofCircularCollimator = 0;
- nVerticesofthePolygonalCollimator = 0;
- }
- tagCollimatorInfo& operator=(const tagCollimatorInfo& txc)
- {
- nCollimatorShape = txc.nCollimatorShape;
- nCollimatorLeftVerticalEdge = txc.nCollimatorLeftVerticalEdge;
- nCollimatorRightVerticalEdge = txc.nCollimatorRightVerticalEdge;
- nCollimatorUpperHorizontalEdge = txc.nCollimatorUpperHorizontalEdge;
- nCollimatorLowerHorizontalEdge = txc.nCollimatorLowerHorizontalEdge;
- nCenterofCircularCollimator = txc.nCenterofCircularCollimator;
- nRadiusofCircularCollimator = txc.nRadiusofCircularCollimator;
- nVerticesofthePolygonalCollimator = txc.nVerticesofthePolygonalCollimator;
- return *this;
- }
- }CollimatorInfo;
- #define OtherInfoOffset (CollimatorInfoOffset + CollimatorInfoLength)
- typedef struct tagOtherInfo
- {
- UINT nFrameID;
- float fBuckyRotateAngel;
- tagOtherInfo()
- {
- nFrameID = 0;
- fBuckyRotateAngel = 0;
- }
- tagOtherInfo& operator=(const tagOtherInfo& oih)
- {
- nFrameID = oih.nFrameID;
- fBuckyRotateAngel = oih.fBuckyRotateAngel;
- return *this;
- }
- }OtherInfo;
- typedef struct tagFrameHeader
- {
- FrameGenInfo stFrameGenInfo;
- FrameFPDInfo stFrameFPDInfo;
- FrameTomoInfo stFrameTomoInfo;
- FrameMaskInfo stFrameMaskInfo;
- PositionInfo stPositionInfo;
- CollimatorInfo stCollimatorInfo;
- OtherInfo stOtherInfo;
- tagFrameHeader()
- {
-
- }
- tagFrameHeader& operator=(const tagFrameHeader& tfh)
- {
- //
- stFrameGenInfo = tfh.stFrameGenInfo;
- stFrameFPDInfo = tfh.stFrameFPDInfo;
- stFrameTomoInfo = tfh.stFrameTomoInfo;
- stFrameMaskInfo = tfh.stFrameMaskInfo;
- stPositionInfo = tfh.stPositionInfo;
- stCollimatorInfo = tfh.stCollimatorInfo;
- stOtherInfo = tfh.stOtherInfo;
- return *this;
- }
- }FRAME_HEADER;
- typedef struct tagDeviceShareMemHeader
- {
- double dPixelSpacingX;
- double dPixelSpacingY;
- FRAME_HEADER stFrameInfo;
-
- tagDeviceShareMemHeader()
- {
- ZeroMemory(this, sizeof(tagDeviceShareMemHeader));
- }
- tagDeviceShareMemHeader& operator=(const tagDeviceShareMemHeader& tfh)
- {
- memcpy(this, &tfh, sizeof(tagDeviceShareMemHeader));
- return *this;
- }
- }DEVICESHAREMEM_HEADER;
|