最近研究了题目中的问题:
bool Parse2Dcms(std::string infilePath, std::string output_path)
{
if (!this->filepath.length())
{
cout << "No No parent dcm filepath! error" << endl;
return false;
}
DcmFileFormat fileformat;
OFCondition oc = fileformat.loadFile(this->filepath.c_str()); //读取Dicom图像
if (!oc.good()) //判断Dicom文件是否读取成功
{
std::cout << "file Load error" << std::endl;
return false;
}
/* dicom meta infomation */
DcmMetaInfo* metainfo = fileformat.getMetaInfo();
OFString FMIG;
metainfo->findAndGetOFString(DCM_FileMetaInformationGroupLength, FMIG);
OFString strVersion;
metainfo->findAndGetOFString(DCM_FileMetaInformationVersion, strVersion);
OFString strMSSOPClassUID;
metainfo->findAndGetOFString(DCM_MediaStorageSOPClassUID, strMSSOPClassUID);
OFString strMMSOPIUID;
metainfo->findAndGetOFString(DCM_MediaStorageSOPInstanceUID, strMMSOPIUID);
OFString strTransferSyntax;
metainfo->findAndGetOFString(DCM_TransferSyntaxUID, strTransferSyntax);
OFString strImpUID;
metainfo->findAndGetOFString(DCM_ImplementationClassUID, strImpUID);
OFString strImpVerName;
metainfo->findAndGetOFString(DCM_ImplementationVersionName, strImpVerName);
/* dicom dataset infomation */
DcmDataset *dataset = fileformat.getDataset(); //得到Dicom的数据集
E_TransferSyntax xfer = dataset->getOriginalXfer(); //得到传输语法
unsigned short img_bits(0);
dataset->findAndGetUint16(DCM_SamplesPerPixel, img_bits); //单个像素占用多少byte
unsigned short bit_count(0);
dataset->findAndGetUint16(DCM_BitsStored, bit_count); //获取像素的位数 bit
OFString isRGB;
dataset->findAndGetOFString(DCM_PhotometricInterpretation, isRGB); //DCM图片的图像模式
OFString strPrimaryAngle;
dataset->findAndGetOFStringArray(DCM_PositionerPrimaryAngleIncrement, strPrimaryAngle);
std::string tagValue = strPrimaryAngle.c_str();
while (true)
{
size_t nPos = tagValue.find('\\');
if (std::string::npos != nPos) {
vAngles.emplace_back(atof(tagValue.substr(0, nPos).c_str()));
tagValue = tagValue.substr(nPos + 1, tagValue.length());
}
else {
vAngles.emplace_back(atof(tagValue.c_str()));
break;
}
} //end while
//0008
OFString strSChSet;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x0005), strSChSet);
OFString strImageType;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x0008), strImageType);
OFString strUniqueID;
dataset->findAndGetOFString(DcmTagKey(0x0008,0x0016), strUniqueID);
OFString strSOPInstanceUID;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x0018), strSOPInstanceUID);
OFString strStudyDate;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x0020), strStudyDate);
OFString strSeriesDate;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x0021), strSeriesDate);
OFString strContentDate;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x0023), strContentDate);
OFString strAcquisitionDateTime;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x002a), strAcquisitionDateTime);
OFString strStudyTime;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x0030), strStudyTime);
OFString strSeriesTime;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x0031), strSeriesTime);
OFString strContentTime;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x0033), strContentTime);
OFString strAccessionNumber;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x0050), strAccessionNumber);
OFString strModality;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x0060), strModality);
OFString strManufacturer;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x0070), strManufacturer);
OFString strInstitutionName;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x0080), strInstitutionName);
OFString strReferringPhysicianName;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x0090), strReferringPhysicianName);
OFString strStationName;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x1010), strStationName);
OFString strStudyDescription;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x1030), strStudyDescription);
OFString strSeriesDescription;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x103e), strSeriesDescription);
OFString strPerformingPhysicianName;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x1050), strPerformingPhysicianName);
OFString strManufacturerModelName;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x1090), strManufacturerModelName);
OFString strReferencedStudySequence;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x1110), strReferencedStudySequence);
OFString strReferencedSOPClassUID;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x1150), strReferencedSOPClassUID);
OFString strReferencedSOPInstanceUID;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x1155), strReferencedSOPInstanceUID);
OFString strReferencedPerformedProcedureStepSequence;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x1111), strReferencedPerformedProcedureStepSequence);
OFString strStartTrim;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x2142), strStartTrim);
OFString strStopTrim;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x2143), strStopTrim);
OFString strPatientIdentityRemoved;
dataset->findAndGetOFString(DcmTagKey(0x0012, 0x0062), strPatientIdentityRemoved);
OFString strIrradiationEventUID;
dataset->findAndGetOFString(DcmTagKey(0x0008, 0x3010), strIrradiationEventUID);
//0010
OFString strPatientName;
dataset->findAndGetOFString(DcmTagKey(0x0010, 0x0010), strPatientName);
OFString strPatientID;
dataset->findAndGetOFString(DcmTagKey(0x0010, 0x0020), strPatientID);
OFString strIssuerOfPatientID;
dataset->findAndGetOFString(DcmTagKey(0x0010, 0x0021), strIssuerOfPatientID);
OFString strPatientBirthDate;
dataset->findAndGetOFString(DcmTagKey(0x0010, 0x0030), strPatientBirthDate);
OFString strPatientSex;
dataset->findAndGetOFString(DcmTagKey(0x0010, 0x0040), strPatientSex);
OFString strPatientSize;
dataset->findAndGetOFString(DcmTagKey(0x0010, 0x1020), strPatientSize);
OFString strPatientWeight;
dataset->findAndGetOFString(DcmTagKey(0x0010, 0x1030), strPatientWeight);
OFString strPatientComments;
dataset->findAndGetOFString(DcmTagKey(0x0010, 0x4000), strPatientComments);
//0018
OFString strImageAndFluoros;
dataset->findAndGetOFString(DcmTagKey(0x0018,0x115e), strImageAndFluoros);
OFString strImagePixelSpace;
dataset->findAndGetOFStringArray(DcmTagKey(0x0018,0x1164), strImagePixelSpace);
OFString strPositionMotion;
dataset->findAndGetOFString(DcmTagKey(0x0018,0x1500), strPositionMotion);
OFString strPositionPrimaryAngle;
OFString strPositionSecondAngle;
dataset->findAndGetOFString(DcmTagKey(0x0018, 0x1510), strPositionPrimaryAngle);
dataset->findAndGetOFString(DcmTagKey(0x0018, 0x1511), strPositionSecondAngle);
OFString strContrastBolus;
dataset->findAndGetOFString(DcmTagKey(0x0018, 0x0010),strContrastBolus);
OFString strPartExamed;
dataset->findAndGetOFString(DcmTagKey(0x0018, 0x0015), strPartExamed);
OFString strCineRate;
dataset->findAndGetOFString(DcmTagKey(0x0018, 0x0040), strCineRate);
OFString strKVP;
dataset->findAndGetOFString(DcmTagKey(0x0018, 0x0060), strKVP);
OFString strDeviceSerialNumber;
dataset->findAndGetOFString(DcmTagKey(0x0018, 0x1000), strDeviceSerialNumber);
OFString strSoftwareVer;
dataset->findAndGetOFString(DcmTagKey(0x0018, 0x1020), strSoftwareVer);
OFString strProtocolName;
dataset->findAndGetOFString(DcmTagKey(0x0018, 0x1030), strProtocolName);
OFString strDistanceToDetector;
dataset->findAndGetOFString(DcmTagKey(0x0018, 0x1110), strDistanceToDetector);
OFString strDistanceToPatient;
dataset->findAndGetOFString(DcmTagKey(0x0018, 0x1111), strDistanceToPatient);
OFString strExposureTime;
dataset->findAndGetOFString(DcmTagKey(0x0018, 0x1150), strExposureTime);
OFString strXRayTube;
dataset->findAndGetOFString(DcmTagKey(0x0018, 0x1151), strXRayTube);
OFString strRadiation;
dataset->findAndGetOFString(DcmTagKey(0x0018, 0x1155), strRadiation);
OFString strRadiationMode;
dataset->findAndGetOFString(DcmTagKey(0x0018, 0x115a), strRadiationMode);
//0020
OFString strStudyInstanceUID;
dataset->findAndGetOFString(DcmTagKey(0x0020, 0x000d), strStudyInstanceUID);
OFString strSeriesInstanceUID;
dataset->findAndGetOFString(DcmTagKey(0x0020, 0x000e), strSeriesInstanceUID);
OFString strStudyID;
dataset->findAndGetOFString(DcmTagKey(0x0020, 0x0010), strStudyID);
OFString strSeriesNumber;
dataset->findAndGetOFString(DcmTagKey(0x0020, 0x0011), strSeriesNumber);
OFString strAcquisitionNumber;
dataset->findAndGetOFString(DcmTagKey(0x0020, 0x0012), strAcquisitionNumber);
OFString strInstanceNumber;
dataset->findAndGetOFString(DcmTagKey(0x0020, 0x0013), strInstanceNumber);
OFString strPatientOrientation;
dataset->findAndGetOFStringArray(DcmTagKey(0x0020, 0x0020), strPatientOrientation);
OFString strImagePositionPatient;
dataset->findAndGetOFStringArray(DcmTagKey(0x0020, 0x0032), strImagePositionPatient);
OFString strLaterality;
dataset->findAndGetOFString(DcmTagKey(0x0020, 0x0060), strLaterality);
//0028
OFString strPixelSpacing;
dataset->findAndGetOFStringArray(DcmTagKey(0x0028, 0x0030), strPixelSpacing);
unsigned short bitsAllocated(0);
dataset->findAndGetUint16(DcmTagKey(0x0028, 0x0100), bitsAllocated);
unsigned short bitsStored(0);
dataset->findAndGetUint16(DcmTagKey(0x0028, 0x0101), bitsStored);
unsigned short hightBit(0);
dataset->findAndGetUint16(DcmTagKey(0x0028, 0x0102), hightBit);
unsigned short pixelRep(0);
dataset->findAndGetUint16(DcmTagKey(0x0028, 0x0103), pixelRep);
OFString strPixelRelationShip;
dataset->findAndGetOFString(DcmTagKey(0x0028, 0x1040), strPixelRelationShip);
OFString strWC;
dataset->findAndGetOFString(DcmTagKey(0x0028, 0x1050), strWC);
OFString strWW;
dataset->findAndGetOFString(DcmTagKey(0x0028, 0x1051), strWW);
OFString strFrameIncrementPointer;
dataset->findAndGetOFString(DcmTagKey(0x0028, 0x0009), strFrameIncrementPointer);
//0040
OFString strPerformedProcedureStepStartDate;
dataset->findAndGetOFString(DcmTagKey(0x0040, 0x0244), strPerformedProcedureStepStartDate);
OFString strPerformedProcedureStepStartTime;
dataset->findAndGetOFString(DcmTagKey(0x0040, 0x0245), strPerformedProcedureStepStartTime);
OFString strPerformedProcedureStepID;
dataset->findAndGetOFString(DcmTagKey(0x0040, 0x0253), strPerformedProcedureStepID);
OFString strPerformedProcedureStepDescription;
dataset->findAndGetOFString(DcmTagKey(0x0040, 0x0254), strPerformedProcedureStepDescription);
unsigned short m_width; //获取图像的窗宽高
unsigned short m_height;
OFString framecount;
//DCM_MinimumStoredValueMapped
// DCM_MaximumStoredValueMapped
dataset->findAndGetOFString(DCM_NumberOfFrames, framecount); //DCM图片的帧数
unsigned short number = atoi(framecount.c_str());
dataset->findAndGetUint16(DCM_Rows, m_height);
dataset->findAndGetUint16(DCM_Columns, m_width);
int rows(m_height);
int cols(m_width);
const int length(rows*cols*2);
Uint16* img_pixel = new Uint16[length];
DicomImage* m_pDicomImage = new DicomImage("文件名", CIF_UsePartialAccessToPixelData, 0, 1);
if (m_pDicomImage == NULL)
throw "Open DICOM File failed";
double min = 0, max = 0;
m_pDicomImage->getMinMaxValues(min, max);
unsigned long FrameCnt = m_pDicomImage->getFrameCount();
unsigned long indexFirstFrame = m_pDicomImage->getFirstFrame();
//
DcmElement* element = NULL;
OFCondition result = dataset->findAndGetElement(DCM_PixelData, element); //获取图像数据
if (result.bad() || element == NULL)
return false;
Uint16* image16_data = nullptr;
result = element->getUint16Array(image16_data); //获取>8位的图像数据
do
{
DcmFileFormat *fileFormat = new DcmFileFormat();
DcmDataset *dataSet = fileFormat->getDataset();
DcmMetaInfo* metaInfo = fileformat.getMetaInfo();
memset(img_pixel, 0, length);
//m_pDicomImage->getOutputData(img_pixel, length, Img_bitCount, indexFirstFrame);
//const DiPixel* pixel = m_pDicomImage->getInterData();
memcpy_s(img_pixel, length, image16_data + rows*cols*indexFirstFrame, length);
//0x0002
metaInfo->putAndInsertString(DCM_FileMetaInformationGroupLength, FMIG.c_str());
metaInfo->putAndInsertString(DCM_FileMetaInformationVersion, strVersion.c_str());
metaInfo->putAndInsertString(DCM_MediaStorageSOPClassUID, strMSSOPClassUID.c_str());
metaInfo->putAndInsertString(DCM_MediaStorageSOPInstanceUID, strMMSOPIUID.c_str());
metaInfo->putAndInsertString(DCM_TransferSyntaxUID, strTransferSyntax.c_str());
metaInfo->putAndInsertString(DCM_ImplementationClassUID, strImpUID.c_str());
metaInfo->putAndInsertString(DCM_ImplementationVersionName, strImpVerName.c_str());
metaInfo->computeGroupLengthAndPadding(EGL_withGL, EPD_noChange, META_HEADER_DEFAULT_TRANSFERSYNTAX, EET_UndefinedLength);
//0x0008
dataSet->putAndInsertString(DCM_SpecificCharacterSet, strSChSet.c_str());
dataSet->putAndInsertString(DCM_ImageType, strImageType.c_str());
dataSet->putAndInsertString(DCM_SOPClassUID, strUniqueID.c_str());
dataSet->putAndInsertString(DCM_SOPInstanceUID, strSOPInstanceUID.c_str());
dataSet->putAndInsertString(DCM_StudyDate, strStudyDate.c_str());
dataSet->putAndInsertString(DCM_SeriesDate, strSeriesDate.c_str());
dataSet->putAndInsertString(DCM_ContentDate, strContentDate.c_str());
dataSet->putAndInsertString(DCM_AcquisitionDateTime, strAcquisitionDateTime.c_str());
dataSet->putAndInsertString(DCM_StudyTime, strStudyTime.c_str());
dataSet->putAndInsertString(DCM_SeriesTime, strSeriesTime.c_str());
dataSet->putAndInsertString(DCM_ContentTime, strContentTime.c_str());
dataSet->putAndInsertString(DCM_AccessionNumber, strAccessionNumber.c_str());
dataSet->putAndInsertString(DCM_Modality, strModality.c_str());
dataSet->putAndInsertString(DCM_Manufacturer, strManufacturer.c_str());
dataSet->putAndInsertString(DCM_InstitutionName, strInstitutionName.c_str());
dataSet->putAndInsertString(DCM_ReferringPhysicianName, strReferringPhysicianName.c_str());
dataSet->putAndInsertString(DcmTagKey(0x0008, 0x1010), strStationName.c_str());
dataSet->putAndInsertString(DcmTagKey(0x0008, 0x1030), strStudyDescription.c_str());
dataSet->putAndInsertString(DcmTagKey(0x0008, 0x103e), strSeriesDescription.c_str());
dataSet->putAndInsertString(DcmTagKey(0x0008, 0x1050), strPerformingPhysicianName.c_str());
dataSet->putAndInsertString(DcmTagKey(0x0008, 0x1090), strManufacturerModelName.c_str());
dataSet->putAndInsertString(DcmTagKey(0x0008, 0x1110), strReferencedStudySequence.c_str());
dataSet->putAndInsertString(DcmTagKey(0x0008, 0x1150), strReferencedSOPClassUID.c_str());
dataSet->putAndInsertString(DcmTagKey(0x0008, 0x1155), strReferencedSOPInstanceUID.c_str());
dataSet->putAndInsertString(DcmTagKey(0x0008, 0x1111), strReferencedPerformedProcedureStepSequence.c_str());
dataSet->putAndInsertString(DcmTagKey(0x0008, 0x2142), strStartTrim.c_str());
dataSet->putAndInsertString(DcmTagKey(0x0008, 0x2143), strStopTrim.c_str());
dataSet->putAndInsertString(DcmTagKey(0x0012, 0x0062), strPatientIdentityRemoved.c_str());
dataSet->putAndInsertString(DcmTagKey(0x0008, 0x3010), strIrradiationEventUID.c_str());
//0010
dataSet->putAndInsertString(DcmTagKey(0x0010, 0x0010), strPatientName.c_str());
dataSet->putAndInsertString(DcmTagKey(0x0010, 0x0020), strPatientID.c_str());
dataSet->putAndInsertString(DcmTagKey(0x0010, 0x0021), strIssuerOfPatientID.c_str());
dataSet->putAndInsertString(DcmTagKey(0x0010, 0x0030), strPatientBirthDate.c_str());
dataSet->putAndInsertString(DcmTagKey(0x0010, 0x0040), strPatientSex.c_str());
dataSet->putAndInsertString(DcmTagKey(0x0010, 0x1020), strPatientSize.c_str());
dataSet->putAndInsertString(DcmTagKey(0x0010, 0x1030), strPatientWeight.c_str());
dataSet->putAndInsertString(DcmTagKey(0x0010, 0x4000), strPatientComments.c_str());
//0x0020
dataSet->putAndInsertString(DcmTagKey(0x0020, 0x000d), strStudyInstanceUID.c_str(),true);
dataSet->putAndInsertString(DcmTagKey(0x0020, 0x000e), strSeriesInstanceUID.c_str(), true);
dataSet->putAndInsertString(DcmTagKey(0x0020, 0x0010), strStudyID.c_str(), true);
dataSet->putAndInsertString(DcmTagKey(0x0020, 0x0011), strSeriesNumber.c_str(), true);
dataSet->putAndInsertString(DcmTagKey(0x0020, 0x0012), strAcquisitionNumber.c_str(), true);
dataSet->putAndInsertString(DcmTagKey(0x0020, 0x0013), strInstanceNumber.c_str(), true);
dataSet->putAndInsertString(DcmTagKey(0x0020, 0x0020), strPatientOrientation.c_str(), true);
dataSet->putAndInsertString(DcmTagKey(0x0020, 0x0032), strImagePositionPatient.c_str(), true);
dataSet->putAndInsertString(DcmTagKey(0x0020, 0x0060), strLaterality.c_str(), true);
//0x0018
dataSet->putAndInsertString(DCM_ImageAndFluoroscopyAreaDoseProduct, strImageAndFluoros.c_str(), true);
dataSet->putAndInsertString(DCM_ImagerPixelSpacing, strImagePixelSpace.c_str(), true);
dataSet->putAndInsertString(DCM_PositionerMotion, strPositionMotion.c_str(), true);
dataSet->putAndInsertString(DCM_PositionerPrimaryAngle, strPositionPrimaryAngle.c_str(), true);
dataSet->putAndInsertString(DCM_PositionerSecondaryAngle, strPositionSecondAngle.c_str(), true);
dataSet->putAndInsertString(DCM_PositionerPrimaryAngleIncrement, std::to_string(vAngles[indexFirstFrame]).c_str());
dataSet->putAndInsertString(DCM_ContrastBolusAgent, strContrastBolus.c_str(), true);
dataSet->putAndInsertString(DCM_BodyPartExamined, strPartExamed.c_str(), true);
dataSet->putAndInsertString(DCM_CineRate, strCineRate.c_str(), true);
dataSet->putAndInsertString(DCM_KVP, strKVP.c_str(), true);
dataSet->putAndInsertString(DCM_DeviceSerialNumber, strDeviceSerialNumber.c_str(), true);
dataSet->putAndInsertString(DCM_SoftwareVersions, strSoftwareVer.c_str(), true);
dataSet->putAndInsertString(DCM_ProtocolName, strProtocolName.c_str(), true);
dataSet->putAndInsertString(DCM_DistanceSourceToDetector, strDistanceToDetector.c_str(), true);
dataSet->putAndInsertString(DCM_DistanceSourceToPatient, strDistanceToPatient.c_str(), true);
dataSet->putAndInsertString(DCM_ExposureTime, strExposureTime.c_str(), true);
dataSet->putAndInsertString(DCM_XRayTubeCurrent, strXRayTube.c_str(), true);
dataSet->putAndInsertString(DCM_RadiationSetting, strRadiation.c_str(), true);
dataSet->putAndInsertString(DCM_RadiationMode, strRadiationMode.c_str(), true);
//0x0028
dataSet->putAndInsertUint16Array(DCM_PixelData, OFreinterpret_cast(Uint16*, img_pixel), length);
dataSet->putAndInsertString(DCM_NumberOfFrames, "1");
dataSet->putAndInsertUint16(DCM_Rows, rows);
dataSet->putAndInsertUint16(DCM_Columns, cols);
dataSet->putAndInsertUint16(DCM_SamplesPerPixel, img_bits);
dataSet->putAndInsertUint16(DCM_BitsStored, bit_count);
dataSet->putAndInsertUint16(DCM_BitsAllocated,bitsAllocated);
dataSet->putAndInsertString(DcmTagKey(0x0028, 0x0009), strFrameIncrementPointer.c_str());
dataSet->putAndInsertString(DCM_PixelSpacing, strPixelSpacing.c_str(), true);
dataSet->putAndInsertUint16(DCM_HighBit, hightBit);
dataSet->putAndInsertUint16(DCM_PixelRepresentation, pixelRep);
dataSet->putAndInsertString(DCM_PixelIntensityRelationship, strPixelRelationShip.c_str(), true);
dataSet->putAndInsertString(DCM_WindowCenter, strWC.c_str(), true);
dataSet->putAndInsertString(DCM_WindowWidth, strWW.c_str(), true);
//0x0040
dataSet->putAndInsertString(DcmTagKey(0x0040, 0x0244), strPerformedProcedureStepStartDate.c_str());
dataSet->putAndInsertString(DcmTagKey(0x0040, 0x0245), strPerformedProcedureStepStartTime.c_str());
dataSet->putAndInsertString(DcmTagKey(0x0040, 0x0253), strPerformedProcedureStepID.c_str());
dataSet->putAndInsertString(DcmTagKey(0x0040, 0x0254), strPerformedProcedureStepDescription.c_str());
dataSet->putAndInsertString(DCM_PhotometricInterpretation, isRGB.c_str());
//保存文件
char t[10];
string filename;
sprintf_s(t, "%d", indexFirstFrame);
filename = t;
filename = output_path + filename + ".dcm";
OFCondition status = fileFormat->saveFile(filename.c_str(), xfer);
if (status.bad())
cout << "Error: cannot write DICOM file (" << status.text() << ")" << endl;
delete fileFormat;
indexFirstFrame = m_pDicomImage->getFirstFrame();
//this->ShowImage(filename);
}while (m_pDicomImage->processNextFrames());
delete[] img_pixel;
return true;
}
其实DicomImage可以不用。这个怎么和DcmDataSet或DcmFileFormat联系起来,欢迎大家讨论。