From: Kevin M. Rosenberg Date: Wed, 7 Mar 2001 16:34:47 +0000 (+0000) Subject: r613: Added DICOM Export X-Git-Tag: debian-4.5.3-3~404 X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=commitdiff_plain;h=4cdd078f0f198a00e8037e6edec0eb30a6861bae r613: Added DICOM Export --- diff --git a/ChangeLog b/ChangeLog index 2d410d2..a48e4ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,7 +14,9 @@ * ctsim: Added PPM/PGM and PNG file import to imagefile. * ctsim: Added import of DICOM grayscale files. - + + * ctsim: Added imagefile export to DICOM files. + * ctsim: Added background and SMP processing for reconstructions. * ctsim: Added background and SMP processing for scanning. diff --git a/include/array2dfile.h b/include/array2dfile.h index f35c592..11834fe 100644 --- a/include/array2dfile.h +++ b/include/array2dfile.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: array2dfile.h,v 1.20 2001/01/28 19:10:18 kevin Exp $ +** $Id: array2dfile.h,v 1.21 2001/03/07 16:34:47 kevin Exp $ ** ** 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 @@ -187,9 +187,15 @@ public: void getPixelValueRange (double& pvmin, double& pvmax) const; void setAxisExtent (double minX, double maxX, double minY, double maxY); - + bool getAxisExtent (double& minX, double& maxX, double& minY, double& maxY) const + { if (! m_axisExtentKnown) return false; minX = m_minX; maxX = m_maxX; minY = m_minY; maxY=m_maxY; + return true; } + void doPixelOffsetScale (double offset, double scale); - + + kfloat64 axisIncrementX() const {return m_axisIncrementKnown ? m_axisIncrementX : 0.;} + kfloat64 axisIncrementY() const {return m_axisIncrementKnown ? m_axisIncrementY : 0.;} + void arrayDataClear (void); bool fileRead (const char* const filename); diff --git a/include/ctndicom.h b/include/ctndicom.h index 011df7c..1a5d475 100644 --- a/include/ctndicom.h +++ b/include/ctndicom.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: ctndicom.h,v 1.4 2001/03/05 21:59:55 kevin Exp $ +** $Id: ctndicom.h,v 1.5 2001/03/07 16:34:47 kevin Exp $ ** ** 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 @@ -110,21 +110,20 @@ public: class DicomExporter { private: + const ImageFile* m_pImageFile; std::string m_strFilename; bool m_bFail; std::string m_strFailMessage; - const ImageFile* m_pImageFile; - DCM_OBJECT* m_pFile; - - void saveImage (unsigned short iNRows, unsigned short iNCols, unsigned short iBitsAllocated, - unsigned short iBitsStored, unsigned short iHighBit, unsigned short iPixRep); + DCM_OBJECT* m_pObject; + bool createDicomObject(); public: - DicomExporter (const char* const pszFile, const ImageFile* pImageFile); + DicomExporter (ImageFile* pImageFile); ~DicomExporter(); + bool writeFile (const char* const pszFilename); bool fail() const {return m_bFail;} const std::string& failMessage() const {return m_strFailMessage;} }; diff --git a/libctsim/ctndicom.cpp b/libctsim/ctndicom.cpp index 8501a0f..36dbeb1 100644 --- a/libctsim/ctndicom.cpp +++ b/libctsim/ctndicom.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: ctndicom.cpp,v 1.6 2001/03/05 21:59:55 kevin Exp $ +** $Id: ctndicom.cpp,v 1.7 2001/03/07 16:34:47 kevin Exp $ ** ** 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 @@ -93,8 +93,22 @@ DicomImporter::loadImage(unsigned short iNRows, unsigned short iNCols, unsigned } } - DCM_ELEMENT elemPixelData = {DCM_PXLPIXELDATA, DCM_OT, "", 1, 0, NULL}; + char szRescaleSlope[17]; + char szRescaleIntercept[17]; + double dRescaleSlope = 1; + double dRescaleIntercept = 0; + DCM_ELEMENT elemRescaleSlope = {DCM_IMGRESCALESLOPE, DCM_DS, "", 1, strlen(szRescaleSlope), szRescaleSlope}; + DCM_ELEMENT elemRescaleIntercept = {DCM_IMGRESCALEINTERCEPT, DCM_DS, "", 1, strlen(szRescaleIntercept), szRescaleIntercept}; + if (DCM_ParseObject (&m_pFile, &elemRescaleSlope, 1, NULL, 0, NULL) == DCM_NORMAL) { + if (sscanf (szRescaleSlope, "%lf", &dRescaleSlope) != 1) + sys_error (ERR_SEVERE, "Error parsing rescale slope"); + } + if (DCM_ParseObject (&m_pFile, &elemRescaleIntercept, 1, NULL, 0, NULL) == DCM_NORMAL) { + if (sscanf (szRescaleIntercept, "%lf", &dRescaleIntercept) != 1) + sys_error (ERR_SEVERE, "Error parsing rescale intercept"); + } + DCM_ELEMENT elemPixelData = {DCM_PXLPIXELDATA, DCM_OT, "", 1, 0, NULL}; // Get the actual pixel data (the only other required element) if (DCM_GetElementSize (&m_pFile, elemPixelData.tag, &lRtnLength) != DCM_NORMAL) { m_bFail = true; @@ -150,7 +164,7 @@ DicomImporter::loadImage(unsigned short iNRows, unsigned short iNCols, unsigned unsigned char cV1 = pRawPixels[lBase]; unsigned char cV2 = pRawPixels[lBase+1] & iMask; int iV = cV1 + (cV2 << 8); - v[ix][iy] = iV / dScale; + v[ix][iy] = iV * dRescaleSlope + dRescaleIntercept; } } } @@ -211,8 +225,191 @@ DicomImporter::loadProjections() DicomImporter::~DicomImporter() { - DCM_CloseObject (&m_pFile); + if (m_pFile) + DCM_CloseObject (&m_pFile); +} + + +DicomExporter::DicomExporter (ImageFile* pImageFile) +: m_pImageFile(pImageFile), m_pObject(NULL) +{ + DCM_Debug (FALSE); + if (! pImageFile) { + m_bFail = true; + m_strFailMessage = "Initialized DicomExported with NULL imagefile"; + return; + } + m_bFail = ! createDicomObject(); +} + +DicomExporter::~DicomExporter () +{ + if (m_pObject) + DCM_CloseObject (&m_pObject); +} + +bool +DicomExporter::writeFile (const char* const pszFilename) +{ + if (! m_pObject) + return false; + + m_strFilename = pszFilename; + + CONDITION cond = DCM_WriteFile (&m_pObject, DCM_ORDERLITTLEENDIAN, pszFilename); + if (cond != DCM_NORMAL) { + m_bFail = true; + m_strFailMessage = "Error writing DICOM file "; + m_strFailMessage += pszFilename; + return false; + } + + return true; +} + +bool +DicomExporter::createDicomObject() +{ + CONDITION cond = DCM_CreateObject (&m_pObject, 0); + if (cond != DCM_NORMAL) { + m_bFail = true; + m_strFailMessage = "Error creating DICOM object"; + return false; + } + + double dMin, dMax; + m_pImageFile->getMinMax (dMin, dMax); + double dWidth = dMax - dMin; + if (dWidth == 0.) + dWidth = 1E-7; + double dScale = 65535. / dWidth; + + double dRescaleIntercept = -dMin; + double dRescaleSlope = 1 / dScale; + char szRescaleIntercept[17]; + char szRescaleSlope[17]; + snprintf (szRescaleIntercept, sizeof(szRescaleIntercept), "%e", dRescaleIntercept); + snprintf (szRescaleSlope, sizeof(szRescaleIntercept), "%e", dRescaleSlope); + + char szModality[] = "CT"; + char szSOPClassUID[65] = "1.2.840.10008.5.4.1.1.2"; + char szImgPhotometricInterp[] = "MONOCHROME2"; + char szPixelSpacing[33] = "0\\0"; + char szRelImageOrientationPatient[100] = "1\\0\\0\\0\\1\\0"; + char szRelImagePositionPatient[49] = "0\\0\\0"; + char szAcqKvp[] = "0"; + char szRelAcquisitionNumber[] = "1"; + char szRelImageNumber[] = "1"; + char szIDSOPInstanceUID[] = ""; + char szIDManufacturer[] = "CTSim"; + char szRelPositionRefIndicator[] = "0"; + char szRelFrameOfReferenceUID[] = ""; + char szRelSeriesNumber[] = "1"; + char szIDAccessionNumber[] = "0"; + char szRelStudyID[] = "1"; + char szIDReferringPhysician[] = "NONE"; + char szIDStudyTime[] = "000000.0"; + char szIDStudyDate[] = "00000000"; + char szRelStudyInstanceUID[] = ""; + char szPatSex[] = "O"; + char szPatBirthdate[] = "0000000"; + char szPatID[] = "NONE"; + char szPatName[] = "NONE"; + char szIDImageType[] = "ORIGINAL"; + char szIDManufacturerModel[65] = ""; + +#ifdef VERSION + snprintf (szIDManufacturerModel, sizeof(szIDManufacturerModel), "VERSION %s", VERSION); +#endif + snprintf (szPixelSpacing, sizeof(szPixelSpacing), "%e\\%e", m_pImageFile->axisIncrementX(), m_pImageFile->axisIncrementY()); + double minX, maxX, minY, maxY; + if (m_pImageFile->getAxisExtent(minX, maxX, minY, maxY)) { + minX += m_pImageFile->axisIncrementX() / 2; + minY += m_pImageFile->axisIncrementY() / 2; + snprintf(szRelImagePositionPatient, sizeof(szRelImagePositionPatient), "%e\\%e\\0", minX, minY); + } + + unsigned short iNRows = m_pImageFile->ny(); + unsigned short iNCols = m_pImageFile->nx(); + unsigned short iBitsAllocated = 16; + unsigned short iBitsStored = 16; + unsigned short iHighBit = 15; + unsigned short iPixRep = 0; + unsigned short iSamplesPerPixel = 1; + DCM_ELEMENT aElemRequired[] = { + {DCM_IMGROWS, DCM_US, "", 1, sizeof(iNRows), reinterpret_cast(&iNRows)}, + {DCM_IMGCOLUMNS, DCM_US, "", 1, sizeof(iNCols), reinterpret_cast(&iNCols)}, + {DCM_IMGBITSALLOCATED, DCM_US, "", 1, sizeof(iBitsAllocated), reinterpret_cast(&iBitsAllocated)}, + {DCM_IMGBITSSTORED, DCM_US, "", 1, sizeof(iBitsStored), reinterpret_cast(&iBitsStored)}, + {DCM_IMGHIGHBIT, DCM_US, "", 1, sizeof(iHighBit), reinterpret_cast(&iHighBit)}, + {DCM_IMGPIXELREPRESENTATION, DCM_US, "", 1, sizeof(iPixRep), reinterpret_cast(&iPixRep)}, + {DCM_IMGSAMPLESPERPIXEL, DCM_US, "", 1, sizeof(iSamplesPerPixel), reinterpret_cast(&iSamplesPerPixel)}, + {DCM_IMGRESCALESLOPE, DCM_DS, "", 1, strlen(szRescaleSlope), szRescaleSlope}, + {DCM_IMGRESCALEINTERCEPT, DCM_DS, "", 1, strlen(szRescaleIntercept), szRescaleIntercept}, + {DCM_IMGPHOTOMETRICINTERP, DCM_CS, "", 1, strlen(szImgPhotometricInterp), szImgPhotometricInterp}, + {DCM_IMGPIXELSPACING, DCM_DS, "", 1, strlen(szPixelSpacing), szPixelSpacing}, + {DCM_RELIMAGEORIENTATIONPATIENT, DCM_DS, "", 1, 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), szRelAcquisitionNumber}, + {DCM_ACQSLICETHICKNESS, DCM_DS, "", 1, strlen(szRelAcquisitionNumber), szRelAcquisitionNumber}, + {DCM_RELIMAGENUMBER, DCM_IS, "", 1, strlen(szRelImageNumber), szRelImageNumber}, + {DCM_IDSOPINSTANCEUID, DCM_UI, "", 1, strlen(szIDSOPInstanceUID), szIDSOPInstanceUID}, + {DCM_IDMANUFACTURER, DCM_LO, "", 1, strlen(szIDManufacturer), szIDManufacturer}, + {DCM_RELPOSITIONREFINDICATOR, DCM_LO, "", 1, strlen(szRelPositionRefIndicator), szRelPositionRefIndicator}, + {DCM_RELFRAMEOFREFERENCEUID, DCM_UI, "", 1, strlen(szRelFrameOfReferenceUID), szRelFrameOfReferenceUID}, + {DCM_RELSERIESNUMBER, DCM_IS, "", 1, strlen(szRelSeriesNumber), szRelSeriesNumber}, + {DCM_RELSERIESINSTANCEUID, DCM_UI, "", 1, strlen(szIDAccessionNumber), szIDAccessionNumber}, + {DCM_IDACCESSIONNUMBER, DCM_SH, "", 1, strlen(szIDAccessionNumber), szIDAccessionNumber}, + {DCM_RELSTUDYID, DCM_SH, "", 1, strlen(szRelStudyID), szRelStudyID}, + {DCM_IDREFERRINGPHYSICIAN, DCM_PN, "", 1, 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), 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), szIDManufacturerModel}, + }; + int nElemRequired = sizeof (aElemRequired) / sizeof(DCM_ELEMENT); + + int iUpdateCount; + cond = DCM_ModifyElements (&m_pObject, aElemRequired, nElemRequired, NULL, 0, &iUpdateCount); + + + DCM_ELEMENT elemPixelData = {DCM_PXLPIXELDATA, DCM_OT, "", 1, 0, NULL}; + + unsigned long lRealLength = 2 * m_pImageFile->nx() * m_pImageFile->ny(); + + unsigned char* pRawPixels = new unsigned char [lRealLength]; + elemPixelData.length = lRealLength; + elemPixelData.d.ot = pRawPixels; + + ImageFileArray v = m_pImageFile->getArray(); + for (int iy = iNRows - 1; iy >= 0; iy--) { + for (int ix = 0; ix < iNCols; ix++) { + unsigned long lBase = (iy * iNRows + ix) * 2; + unsigned int iValue = nearest(dScale * (v[ix][iy] - dMin)); + pRawPixels[lBase] = iValue & 0xFF; + pRawPixels[lBase+1] = (iValue & 0xFF00) >> 8; + } + } + cond = DCM_ModifyElements (&m_pObject, &elemPixelData, 1, NULL, 0, &iUpdateCount); + delete pRawPixels; + + if (cond != DCM_NORMAL || iUpdateCount != 1) { + m_bFail = true; + m_strFailMessage = "Error modifying pixel data"; + return false; + } + + return true; } #endif // HAVE_CTN_DICOM + diff --git a/libctsim/imagefile.cpp b/libctsim/imagefile.cpp index d047404..7c9e91e 100644 --- a/libctsim/imagefile.cpp +++ b/libctsim/imagefile.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: imagefile.cpp,v 1.39 2001/03/02 02:08:14 kevin Exp $ +** $Id: imagefile.cpp,v 1.40 2001/03/07 16:34:47 kevin Exp $ ** ** 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 @@ -26,6 +26,9 @@ ******************************************************************************/ #include "ct.h" +#ifdef HAVE_CTN_DICOM +#include "ctndicom.h" +#endif const double ImageFile::s_dRedGrayscaleFactor = 0.299; const double ImageFile::s_dGreenGrayscaleFactor = 0.587; @@ -1565,7 +1568,16 @@ ImageFile::exportImage (const char* const pszFormat, const char* const pszFilena return writeImagePNG (pszFilename, 8, nxcell, nycell, densmin, densmax); else if (iFormatID == EXPORT_FORMAT_PNG16) return writeImagePNG (pszFilename, 16, nxcell, nycell, densmin, densmax); - +#ifdef HAVE_CTN_DICOM + else if (iFormatID == EXPORT_FORMAT_DICOM) { + DicomExporter dicomExport (this); + bool bSuccess = dicomExport.writeFile (pszFilename); + if (! bSuccess) + sys_error (ERR_SEVERE, dicomExport.failMessage().c_str()); + return bSuccess; + } +#endif + sys_error (ERR_SEVERE, "Invalid format %s [ImageFile::exportImage]", pszFormat); return false; } diff --git a/msvc/ctsim/ctsim.plg b/msvc/ctsim/ctsim.plg index d59ef2a..a5660e4 100644 --- a/msvc/ctsim/ctsim.plg +++ b/msvc/ctsim/ctsim.plg @@ -6,13 +6,43 @@ --------------------Configuration: libctsim - Win32 Debug--------------------

Command Lines

-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP11A.tmp" with contents +Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPD4.tmp" with contents [ -/nologo /G6 /MTd /W3 /Gm /Gi /GR /GX /Zi /Od /Gy /I "..\..\..\wx2.2.5\src\png" /I "..\..\..\wx2.2.5\src\zlib" /I "..\..\INCLUDE" /I "..\..\getopt" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /I "..\..\..\wx2.2.5\include" /I "\dicom\ctn\include" /D "_DEBUG" /D "HAVE_WXWIN" /D "HAVE_STRING_H" /D "HAVE_GETOPT_H" /D "WIN32" /D "_MBCS" /D "_LIB" /D "MSVC" /D "HAVE_FFTW" /D "HAVE_PNG" /D "HAVE_SGP" /D "HAVE_WXWINDOWS" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "HAVE_CTN_DICOM" /FR"Debug/" /Fp"Debug/libctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c +/nologo /G6 /MTd /W3 /Gm /Gi /GR /GX /Zi /Od /Gy /I "..\..\..\wx2.2.5\src\png" /I "..\..\..\wx2.2.5\src\zlib" /I "..\..\INCLUDE" /I "..\..\getopt" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /I "..\..\..\wx2.2.5\include" /I "\dicom\ctn\include" /D "_DEBUG" /D "HAVE_WXWIN" /D "HAVE_STRING_H" /D "HAVE_GETOPT_H" /D "WIN32" /D "_MBCS" /D "_LIB" /D "MSVC" /D "HAVE_FFTW" /D "HAVE_PNG" /D "HAVE_SGP" /D "HAVE_WXWINDOWS" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "HAVE_CTN_DICOM" /D VERSION=\"3.1.0\" /FR"Debug/" /Fp"Debug/libctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c +"C:\ctsim\libctsim\backprojectors.cpp" +"C:\ctsim\libctsupport\clip.cpp" +"C:\ctsim\libctsupport\consoleio.cpp" "C:\ctsim\libctsim\ctndicom.cpp" +"C:\ctsim\libctgraphics\dlgezplot.cpp" +"C:\ctsim\libctgraphics\ezplot.cpp" +"C:\ctsim\libctgraphics\ezset.cpp" +"C:\ctsim\libctgraphics\ezsupport.cpp" +"C:\ctsim\libctsim\filter.cpp" +"C:\ctsim\libctsupport\fnetorderstream.cpp" +"C:\ctsim\libctsim\fourier.cpp" +"C:\ctsim\getopt\getopt.c" +"C:\ctsim\getopt\getopt1.c" +"C:\ctsim\libctsim\globalvars.cpp" +"C:\ctsim\libctsupport\hashtable.cpp" +"C:\ctsim\libctsim\imagefile.cpp" +"C:\ctsim\libctsupport\interpolator.cpp" +"C:\ctsim\libctsupport\mathfuncs.cpp" +"C:\ctsim\libctsim\phantom.cpp" +"C:\ctsim\libctsupport\plotfile.cpp" +"C:\ctsim\libctgraphics\pol.cpp" +"C:\ctsim\libctsim\procsignal.cpp" +"C:\ctsim\libctsim\projections.cpp" +"C:\ctsim\libctsim\reconstruct.cpp" +"C:\ctsim\libctsim\scanner.cpp" +"C:\ctsim\libctgraphics\sgp.cpp" +"C:\ctsim\libctsupport\strfuncs.cpp" +"C:\ctsim\libctsupport\syserror.cpp" +"C:\ctsim\libctsim\trace.cpp" +"C:\ctsim\libctgraphics\transformmatrix.cpp" +"C:\ctsim\libctsupport\xform.cpp" ] -Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP11A.tmp" -Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP11B.tmp" with contents +Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPD4.tmp" +Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPD5.tmp" with contents [ /nologo /out:"Debug\libctsim.lib" .\Debug\array2dfile.obj @@ -48,16 +78,52 @@ Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP11B.tmp" with conten .\Debug\transformmatrix.obj .\Debug\xform.obj ] -Creating command line "link.exe -lib @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP11B.tmp" +Creating command line "link.exe -lib @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPD5.tmp"

Output Window

Compiling... +backprojectors.cpp +clip.cpp +consoleio.cpp ctndicom.cpp +dlgezplot.cpp +ezplot.cpp +ezset.cpp +ezsupport.cpp +filter.cpp +fnetorderstream.cpp +fourier.cpp +getopt.c +getopt1.c +C:\ctsim\getopt\getopt1.c(73) : warning C4028: formal parameter 2 different from declaration +C:\ctsim\getopt\getopt1.c(73) : warning C4028: formal parameter 3 different from declaration +C:\ctsim\getopt\getopt1.c(73) : warning C4028: formal parameter 4 different from declaration +C:\ctsim\getopt\getopt1.c(89) : warning C4028: formal parameter 2 different from declaration +C:\ctsim\getopt\getopt1.c(89) : warning C4028: formal parameter 3 different from declaration +C:\ctsim\getopt\getopt1.c(89) : warning C4028: formal parameter 4 different from declaration +globalvars.cpp +hashtable.cpp +imagefile.cpp +interpolator.cpp +mathfuncs.cpp +phantom.cpp +plotfile.cpp +pol.cpp +procsignal.cpp +projections.cpp +reconstruct.cpp +scanner.cpp +sgp.cpp +strfuncs.cpp +syserror.cpp +trace.cpp +transformmatrix.cpp +xform.cpp Creating library...

--------------------Configuration: ctsim - Win32 Debug--------------------

Command Lines

-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP11C.tmp" with contents +Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPD6.tmp" with contents [ winmm.lib rpcrt4.lib ws2_32.lib ../libctsim/Debug/libctsim.lib libcmtd.lib ..\..\..\fftw-2.1.3\Win32\FFTW2st\Debug\FFTW2st.lib ..\..\..\fftw-2.1.3\Win32\RFFTW2st\Debug\RFFTW2st.lib wxd.lib xpmd.lib tiffd.lib zlibd.lib pngd.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib htmlhelp.lib ctn_lib.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/ctsim.pdb" /debug /machine:I386 /out:"Debug/ctsim.exe" /pdbtype:sept /libpath:"\wx2.2.5\lib" /libpath:"\dicom\ctn\winctn\ctn_lib\Debug" .\Debug\backgroundmgr.obj @@ -84,14 +150,14 @@ winmm.lib rpcrt4.lib ws2_32.lib ../libctsim/Debug/libctsim.lib libcmtd.lib ..\.. \wx2.2.5\lib\zlibd.lib \wx2.2.5\lib\tiffd.lib ] -Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP11C.tmp" +Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPD6.tmp"

Output Window

Linking...

Results

-ctsim.exe - 0 error(s), 0 warning(s) +ctsim.exe - 0 error(s), 6 warning(s) diff --git a/src/ctsim.cpp b/src/ctsim.cpp index 331a854..d42bab2 100644 --- a/src/ctsim.cpp +++ b/src/ctsim.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: ctsim.cpp,v 1.97 2001/03/05 21:59:55 kevin Exp $ +** $Id: ctsim.cpp,v 1.98 2001/03/07 16:34:47 kevin Exp $ ** ** 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 @@ -70,7 +70,7 @@ #endif #endif -static const char* rcsindent = "$Id: ctsim.cpp,v 1.97 2001/03/05 21:59:55 kevin Exp $"; +static const char* rcsindent = "$Id: ctsim.cpp,v 1.98 2001/03/07 16:34:47 kevin Exp $"; struct option CTSimApp::ctsimOptions[] = { @@ -457,7 +457,7 @@ MainFrame::MainFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const m_dDefaultFilterBandwidth = 1.; m_dDefaultFilterInputScale = 1.; m_dDefaultFilterOutputScale = 1.; - m_iDefaultImportFormat = ImageFile::IMPORT_FORMAT_PPM; + m_iDefaultImportFormat = ImageFile::IMPORT_FORMAT_PNG; wxAcceleratorEntry accelEntries[15]; accelEntries[0].Set (wxACCEL_CTRL, static_cast('O'), wxID_OPEN); diff --git a/src/views.cpp b/src/views.cpp index 7bbf71a..e7d3502 100644 --- a/src/views.cpp +++ b/src/views.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: views.cpp,v 1.127 2001/03/05 20:29:23 kevin Exp $ +** $Id: views.cpp,v 1.128 2001/03/07 16:34:47 kevin Exp $ ** ** 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 @@ -1095,6 +1095,12 @@ ImageFileView::OnExport (wxCommandEvent& event) strExt = ".png"; strWildcard = "PNG Files (*.png)|*.png"; } +#endif +#ifdef HAVE_CTN_DICOM + else if (m_iDefaultExportFormatID == ImageFile::EXPORT_FORMAT_DICOM) { + strExt = ""; + strWildcard = "DICOM Files (*.*)|*.*"; + } #endif else { strExt = "";