X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=libctsim%2Fctndicom.cpp;fp=libctsim%2Fctndicom.cpp;h=df00792d89424276b403f3ef22e92a0c6c408812;hp=29f2f48d0013ab1d87b3f6438f6b9fb11a6d6553;hb=e89023477e02d9332f87cab5a7975407625dbd60;hpb=e81377bc16b3f8f5cd326d0260d284bdc25d68f3 diff --git a/libctsim/ctndicom.cpp b/libctsim/ctndicom.cpp index 29f2f48..df00792 100644 --- a/libctsim/ctndicom.cpp +++ b/libctsim/ctndicom.cpp @@ -1,13 +1,13 @@ /***************************************************************************** ** FILE IDENTIFICATION ** -** Name: ctndicomp.cpp -** Purpose: Interface to CTN Dicom classes +** Name: ctndicomp.cpp +** Purpose: Interface to CTN Dicom classes ** Programmer: Kevin Rosenberg ** Date Started: March 2001 ** ** This is part of the CTSim program -** Copyright (c) 1983-2009 Kevin Rosenberg +** Copyright (c) 1983-2018 Kevin Rosenberg ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -113,10 +113,10 @@ DicomImporter::loadImage(unsigned short iNRows, unsigned short iNCols, unsigned double dRescaleSlope = 1; double dRescaleIntercept = 0; DCM_ELEMENT elemRescaleSlope = - {DCM_IMGRESCALESLOPE, DCM_DS, "", 1, strlen(szRescaleSlope), + {DCM_IMGRESCALESLOPE, DCM_DS, "", 1, (U32) strlen(szRescaleSlope), {szRescaleSlope}}; DCM_ELEMENT elemRescaleIntercept = - {DCM_IMGRESCALEINTERCEPT, DCM_DS, "", 1, strlen(szRescaleIntercept), + {DCM_IMGRESCALEINTERCEPT, DCM_DS, "", 1, (U32) strlen(szRescaleIntercept), {szRescaleIntercept}}; if (DCM_ParseObject (&m_pFile, &elemRescaleSlope, 1, NULL, 0, NULL) == DCM_NORMAL) { if (sscanf (szRescaleSlope, "%lf", &dRescaleSlope) != 1) @@ -382,56 +382,56 @@ DicomExporter::createDicomObject() {reinterpret_cast(&iPixRep)}}, {DCM_IMGSAMPLESPERPIXEL, DCM_US, "", 1, sizeof(iSamplesPerPixel), {reinterpret_cast(&iSamplesPerPixel)}}, - {DCM_IMGRESCALESLOPE, DCM_DS, "", 1, strlen(szRescaleSlope), + {DCM_IMGRESCALESLOPE, DCM_DS, "", 1, (U32) strlen(szRescaleSlope), {szRescaleSlope}}, - {DCM_IMGRESCALEINTERCEPT, DCM_DS, "", 1, strlen(szRescaleIntercept), + {DCM_IMGRESCALEINTERCEPT, DCM_DS, "", 1, (U32) strlen(szRescaleIntercept), {szRescaleIntercept}}, - {DCM_IMGPHOTOMETRICINTERP, DCM_CS, "", 1, strlen(szImgPhotometricInterp), + {DCM_IMGPHOTOMETRICINTERP, DCM_CS, "", 1, (U32) strlen(szImgPhotometricInterp), {szImgPhotometricInterp}}, - {DCM_IMGPIXELSPACING, DCM_DS, "", 1, strlen(szPixelSpacing), + {DCM_IMGPIXELSPACING, DCM_DS, "", 1, (U32) strlen(szPixelSpacing), {szPixelSpacing}}, {DCM_RELIMAGEORIENTATIONPATIENT, DCM_DS, "", 1, - strlen(szRelImageOrientationPatient), {szRelImageOrientationPatient}}, + (U32) strlen(szRelImageOrientationPatient), {szRelImageOrientationPatient}}, {DCM_RELIMAGEPOSITIONPATIENT, DCM_DS, "", 1, - strlen(szRelImagePositionPatient), {szRelImagePositionPatient}}, - {DCM_ACQKVP, DCM_DS, "", 1, strlen(szAcqKvp), {szAcqKvp}}, - {DCM_RELACQUISITIONNUMBER, DCM_IS, "", 1, strlen(szRelAcquisitionNumber), + (U32) strlen(szRelImagePositionPatient), {szRelImagePositionPatient}}, + {DCM_ACQKVP, DCM_DS, "", 1, (U32) strlen(szAcqKvp), {szAcqKvp}}, + {DCM_RELACQUISITIONNUMBER, DCM_IS, "", 1, (U32) strlen(szRelAcquisitionNumber), {szRelAcquisitionNumber}}, - {DCM_ACQSLICETHICKNESS, DCM_DS, "", 1, strlen(szRelAcquisitionNumber), + {DCM_ACQSLICETHICKNESS, DCM_DS, "", 1, (U32) strlen(szRelAcquisitionNumber), {szRelAcquisitionNumber}}, - {DCM_RELIMAGENUMBER, DCM_IS, "", 1, strlen(szRelImageNumber), + {DCM_RELIMAGENUMBER, DCM_IS, "", 1, (U32) strlen(szRelImageNumber), {szRelImageNumber}}, - {DCM_IDSOPINSTANCEUID, DCM_UI, "", 1, strlen(szIDSOPInstanceUID), + {DCM_IDSOPINSTANCEUID, DCM_UI, "", 1, (U32) strlen(szIDSOPInstanceUID), {szIDSOPInstanceUID}}, - {DCM_IDMANUFACTURER, DCM_LO, "", 1, strlen(szIDManufacturer), + {DCM_IDMANUFACTURER, DCM_LO, "", 1, (U32) strlen(szIDManufacturer), {szIDManufacturer}}, {DCM_RELPOSITIONREFINDICATOR, DCM_LO, "", 1, - strlen(szRelPositionRefIndicator), {szRelPositionRefIndicator}}, + (U32) strlen(szRelPositionRefIndicator), {szRelPositionRefIndicator}}, {DCM_RELFRAMEOFREFERENCEUID, DCM_UI, "", 1, - strlen(szRelFrameOfReferenceUID), {szRelFrameOfReferenceUID}}, - {DCM_RELSERIESNUMBER, DCM_IS, "", 1, strlen(szRelSeriesNumber), + (U32) strlen(szRelFrameOfReferenceUID), {szRelFrameOfReferenceUID}}, + {DCM_RELSERIESNUMBER, DCM_IS, "", 1, (U32) strlen(szRelSeriesNumber), {szRelSeriesNumber}}, - {DCM_RELSERIESINSTANCEUID, DCM_UI, "", 1, strlen(szIDAccessionNumber), + {DCM_RELSERIESINSTANCEUID, DCM_UI, "", 1, (U32) strlen(szIDAccessionNumber), {szIDAccessionNumber}}, - {DCM_IDACCESSIONNUMBER, DCM_SH, "", 1, strlen(szIDAccessionNumber), + {DCM_IDACCESSIONNUMBER, DCM_SH, "", 1, (U32) strlen(szIDAccessionNumber), {szIDAccessionNumber}}, - {DCM_RELSTUDYID, DCM_SH, "", 1, strlen(szRelStudyID), {szRelStudyID}}, - {DCM_IDREFERRINGPHYSICIAN, DCM_PN, "", 1, strlen(szIDReferringPhysician), + {DCM_RELSTUDYID, DCM_SH, "", 1, (U32) strlen(szRelStudyID), {szRelStudyID}}, + {DCM_IDREFERRINGPHYSICIAN, DCM_PN, "", 1, (U32) strlen(szIDReferringPhysician), {szIDReferringPhysician}}, - {DCM_IDSTUDYTIME, DCM_TM, "", 1, strlen(szIDStudyTime), {szIDStudyTime}}, - {DCM_IDSTUDYDATE, DCM_DA, "", 1, strlen(szIDStudyDate), {szIDStudyDate}}, - {DCM_RELSTUDYINSTANCEUID, DCM_UI, "", 1, strlen(szRelStudyInstanceUID), + {DCM_IDSTUDYTIME, DCM_TM, "", 1, (U32) strlen(szIDStudyTime), {szIDStudyTime}}, + {DCM_IDSTUDYDATE, DCM_DA, "", 1, (U32) strlen(szIDStudyDate), {szIDStudyDate}}, + {DCM_RELSTUDYINSTANCEUID, DCM_UI, "", 1, (U32) strlen(szRelStudyInstanceUID), {szRelStudyInstanceUID}}, - {DCM_PATSEX, DCM_CS, "", 1, strlen(szPatSex), {szPatSex}}, - {DCM_PATBIRTHDATE, DCM_DA, "", 1, strlen(szPatBirthdate), {szPatBirthdate}}, - {DCM_PATID, DCM_LO, "", 1, strlen(szPatID), {szPatID}}, - {DCM_PATNAME, DCM_PN, "", 1, strlen(szPatName), {szPatName}}, - {DCM_IDIMAGETYPE, DCM_CS, "", 1, strlen(szIDImageType), {szIDImageType}}, - {DCM_IDMODALITY, DCM_CS, "", 1, strlen(szModality), {szModality}}, - {DCM_IDSOPCLASSUID, DCM_UI, "", 1, strlen(szSOPClassUID), {szSOPClassUID}}, - {DCM_IDMANUFACTURERMODEL, DCM_LO, "", 1, strlen(szIDManufacturerModel), + {DCM_PATSEX, DCM_CS, "", 1, (U32) strlen(szPatSex), {szPatSex}}, + {DCM_PATBIRTHDATE, DCM_DA, "", 1, (U32) strlen(szPatBirthdate), {szPatBirthdate}}, + {DCM_PATID, DCM_LO, "", 1, (U32) strlen(szPatID), {szPatID}}, + {DCM_PATNAME, DCM_PN, "", 1, (U32) strlen(szPatName), {szPatName}}, + {DCM_IDIMAGETYPE, DCM_CS, "", 1, (U32) strlen(szIDImageType), {szIDImageType}}, + {DCM_IDMODALITY, DCM_CS, "", 1, (U32) strlen(szModality), {szModality}}, + {DCM_IDSOPCLASSUID, DCM_UI, "", 1, (U32) strlen(szSOPClassUID), {szSOPClassUID}}, + {DCM_IDMANUFACTURERMODEL, DCM_LO, "", 1, (U32) strlen(szIDManufacturerModel), {szIDManufacturerModel}}, - {DCM_PATCOMMENTS, DCM_LT, "", 1, strlen(pszPatComments), {pszPatComments}}, + {DCM_PATCOMMENTS, DCM_LT, "", 1, (U32) strlen(pszPatComments), {pszPatComments}}, }; int nElemRequired = sizeof (aElemRequired) / sizeof(DCM_ELEMENT);