projects
/
ctsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Automated commit for upstream build of version 5.0.5
[ctsim.git]
/
include
/
ctndicom.h
diff --git
a/include/ctndicom.h
b/include/ctndicom.h
index cbd6a22e20cbeed59d201f023cac245bd949dbb1..0a1d0fc56aad980ff9837a988adff6b33b8226d3 100644
(file)
--- a/
include/ctndicom.h
+++ b/
include/ctndicom.h
@@
-1,15
+1,15
@@
/*****************************************************************************
** FILE IDENTIFICATION
**
/*****************************************************************************
** FILE IDENTIFICATION
**
-** Name: ctndicomp.cpp
+**
Name: ctndicomp.cpp
** Purpose: Interface to CTN Dicom header
** Purpose: Interface to CTN Dicom header
-** Programmer: Kevin Rosenberg
-** Date Started: March 2001
+**
Programmer: Kevin Rosenberg
+**
Date Started: March 2001
**
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
**
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id
: ctndicom.h,v 1.3 2001/03/05 15:10:58 kevin Exp
$
+** $Id$
**
** 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
**
** 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
@@
-29,13
+29,42
@@
#define _CTNDICOM_H_
#if HAVE_CTN_DICOM
#define _CTNDICOM_H_
#if HAVE_CTN_DICOM
-#include <string>
-
-#include "dicom.h"
-#include "condition.h"
-#include "lst.h"
-#include "dicom_objects.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef GCCSUNOS
+#include <sys/types.h>
+#endif
+
+#include "ctsupport.h"
+
+#if SIZEOF_LONG == 4
+#define LONGSIZE 32
+#elif SIZEOF_LONG ==8
+#define LONGSIZE 64
+#endif
+
+#if SIZEOF_INT == 2
+#define INTSIZE 16
+#elif SIZEOF_INT == 4
+#define INTSIZE 32
+#elif SIZEOF_INT == 8
+#define INTSIZE 64
+#endif
+
+#if SIZEOF_SHORT == 2
+#define SHORTSIZE 16
+#elif SIZEOF_SHORT == 4
+#define SHORTSIZE 32
+#endif
+
+#include "dicom.h"
+#include "ctnthread.h"
+#include "lst.h"
+#include "condition.h"
+#include "dicom_objects.h"
+#include <string>
class ImageFile;
class Projections;
class ImageFile;
class Projections;
@@
-49,7
+78,7
@@
private:
Projections* m_pProjections;
DCM_OBJECT* m_pFile;
Projections* m_pProjections;
DCM_OBJECT* m_pFile;
- void loadImage(unsigned short iNRows, unsigned short iNCols, unsigned short iBitsAllocated,
+ void loadImage(unsigned short iNRows, unsigned short iNCols, unsigned short iBitsAllocated,
unsigned short iBitsStored, unsigned short iHighBit, unsigned short iPixRep);
void loadProjections();
unsigned short iBitsStored, unsigned short iHighBit, unsigned short iPixRep);
void loadProjections();
@@
-81,21
+110,20
@@
public:
class DicomExporter {
private:
class DicomExporter {
private:
+ const ImageFile* m_pImageFile;
std::string m_strFilename;
bool m_bFail;
std::string m_strFailMessage;
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:
public:
- DicomExporter (
const char* const pszFile, const
ImageFile* pImageFile);
+ DicomExporter (ImageFile* pImageFile);
~DicomExporter();
~DicomExporter();
+ bool writeFile (const char* const pszFilename);
bool fail() const {return m_bFail;}
const std::string& failMessage() const {return m_strFailMessage;}
};
bool fail() const {return m_bFail;}
const std::string& failMessage() const {return m_strFailMessage;}
};