#include <iostream.h>
#include <iostream>
#include <iomanip.h>
#include <iomanip>
#include <cstdio>
#include <string.h>
#include <ctype.h>
#include "elmdict.h"
#include "mesgtext.h"
using namespace std;
static bool
isOtherByteOrWordVR(const char *vr)
{
#include <string>
#include "basetype.h"
#include "getoptns.h"
#define INPUTLINEBUFFERLENGTH 32768
// all the following is copied from dconvert/fltype.h
#ifdef POWINTEGEREXPONENTTYPE
#define powi(m,e) pow(m,(POWINTEGEREXPONENTTYPE)(e))
#else
#include <fstream.h>
#include <fstream>
#include "attrmxls.h"
#include "dcopt.h"
// In a lot of places, there is an assumption that sequences and items will
// be written delimited, ie. with undefined lengths ... this will break if
// this changes (write() in attrseq.cc) :(
//#include <time.h>
#include "dcdtchg.h"
class EntryString {
HashKeyString key;
const char *value;
#include "iodcomp.h"
static const char *
getStringValueElseDefault(AttributeList &list,Tag tag,const char *def)
#include "elmconst.h"
#include "transynd.h"
#define M_PI 3.14159265358979323846
#endif
static const double defaultWindowCenter = 127.5;
static const double defaultWindowWidth = 256;
#include "attrtype.h"
static Attribute *
isValuePresentElseAbort(AttributeList &list,Tag tag,const char *label,const char *filename,TextOutputStream &log)
#include "ioopt.h"
static void copyBytes(istream& i,ostream& o) {
const int bufsize=1024;
char buffer[1024];
static ElementDictionary staticDictionary;
// Various functions to check and match values ...
#include "transynu.h"
writeImageInSequence(Attribute *a,
DicomOutputOptions& dicom_output_options,
// Define a funky derived OX class to be able to writeBase() and not activateSource() ...
#include "attrnew.h"
#include "dcstream.h"
static const char *options_output_key[] = {
"key",
"k",
#include "hash.h"
#include "uidgen.h"
class UIDEntryString {
#include "sopclu.h"
// The following are copied unchanged from dcmulti.cc
#include <assert.h>
#include <stdlib.h> // for atoi()
int
main(int argc,char **argv)
#include <iostream.h> // for listsimp.h
#include <iostream> // for listsimp.h
#include <iomanip.h> // for listsimp.h
#include <iomanip> // for listsimp.h
#include <string.h> // for strlen()
#include <ctype.h> // for isdigit()
class Patch {
unsigned offset;
unsigned length;
#ifndef REPLACESTANDARDIOBUFSIZE
#define REPLACESTANDARDIOBUFSIZE 16384
#include "bnstream.h"
#include "errclass.h"
class TIFF_Reader : public ErrorsInClass {
private:
BinaryInputStream *bin;
const unsigned DefaultBufferSizeIncrement = 1024;
const double ReasonableMinimumFloatToShow = 0.01;
#include "txstream.h"
const Uint16 JPEG_MARKER_APP0 = 0xffe0;
const Uint16 JPEG_MARKER_APP1 = 0xffe1;
const Uint16 JPEG_MARKER_APP2 = 0xffe2;
#include <float.h>
#ifndef PNMBIGRAW
#define PNMBIGRAW 1
static Uint16
read16(istream& instream)
#define __Header_planev__
#ifdef DEBUGPLANE
#include <math.h>
#define cosd(theta) cos((theta)/180*M_PI)
#define sind(theta) sin((theta)/180*M_PI)
enum Index3D { X=0,Y,Z };
class Vector3DBase {
#ifndef __Header_ptyhdr__
#define __Header_ptyhdr__
#include "convtype.h"
#include "datetype.h"
#include "dateconv.h"
static inline bool
ReadProprietaryHeader(istream *istr,long offset,size_t length,char *buffer)
#ifndef __Header_bnstream__
#define __Header_bnstream__
//#include <iomanip.h>
//#include <iomanip>
#include "endtype.h"
// Note that great care has to be taken adding insert and
// extract operators as these classes (and any derived classes)
// are themselves derived from iostream classes which DO NOT
#ifndef __Header_endtype__
#define __Header_endtype__
#include <iostream.h> //for debugging only
#include <iostream> //for debugging only
typedef enum { NoEndian, LittleEndian, BigEndian, ByteEndian } Endian;
#ifndef __Header_errclass__
#define __Header_errclass__
class ErrorsInClass {
#ifndef __Header_listsimp__
#define __Header_listsimp__
template<class T> class SimpleList;
template<class T> class SimpleListIterator;
#ifndef __Header_nstream__
#define __Header_nstream__
class netbuf: public streambuf {
protected:
#ifndef __Header_txstream__
#define __Header_txstream__
class TextOutputStream : public ostream {
public:
#ifndef __Header_srcsink__
#define __Header_srcsink__
#include <istream>
#include "buffer.h"
#ifndef DEFAULTCHUNKSIZE
#define DEFAULTCHUNKSIZE 16384
template<class T>
class SourceBase {
#include "attr.h"
#include "srcsink.h"
#include "rdimage.h"
#include "rdargb.h"
ReadableInterleaved32BitARGBImage::ReadableInterleaved32BitARGBImage(
SupplySource *s,Uint16 vColumns,Uint16 vRows,Uint16 vNumberOfFrames,
Uint16 vBitsAllocated,Uint16 vBitsStored,Uint16 vHighBit,
#include "rdcmyk.h"
ReadableInterleaved32BitCMYKImage::ReadableInterleaved32BitCMYKImage(
Uint16 vBitsAllocated,Uint16 vBitsStored,Uint16 vHighBit)
#include "rdgray.h"
ReadableWindowed8BitGrayImage::ReadableWindowed8BitGrayImage(
#include "rdhsv.h"
ReadableInterleaved24BitHSVImage::ReadableInterleaved24BitHSVImage(
class SourceBase<Uint16> *
ReadableImage::getSource(void)
#include "rdindex.h"
Readable8BitIndexedColorImage::Readable8BitIndexedColorImage(
#include "rdrgb.h"
ReadableInterleaved24BitRGBImage::ReadableInterleaved24BitRGBImage(
#include <iostream.h> // only for debugging
#include <iostream> // only for debugging
#include <iomanip.h> // only for debugging
#include <iomanip> // only for debugging
#include "usegray.h"
UseableWindowedGrayImage::UseableWindowedGrayImage(
bool invertedgrayscale,Uint16 bits,bool issigned)
#define LARGESTOTHERDATATOKEEPINMEMORY 524288
// Want a routine to actually read rather than just use seekg(), since otherwise
// there is no detection of failure to skip a truncated attribute at the end
// of the dataset
#include "binvalc.h"
#include "binvald.h"
//#include <iostream.h> // for cerr
//#include <iostream> // for cerr
//#include <iomanip.h> // for cerr
//#include <iomanip> // for cerr
#include "charset.h"
SpecificCharacterSetInfo::SpecificCharacterSetInfo(void) {
setSpecificCharacterSet();
}
static const char *options_input_file[] = {
"if",
"input-file",
#include "attrlist.h"
static const char *options_output_file[] = {
"output-file",
"of",
#include "tagvalc.h"
#include "transyn.h"
static TransferSyntaxDictionary tsd;
TransferSyntax::TransferSyntax(const char *uid)
#ifdef CRAP
#include <time.h>
#define UIDGEN_RAWDATA ".9"
#define UIDGEN_IRRADIATIONEVENT ".10"
void
GeneratedUID::setSOPInstance()
// many of the get and extract methods should be a template
// but can't figure out how to have template functions declared within
// a class
struct EMSGDC_Table_Entry {
const char *index;
const char *description;
#include "ourdisp.h"
OurDisplay::OurDisplay(void)
name = NULL;
exit 1
print "#include <iostream>"
print "using namespace std;"
print ""
mode=""
#include <stdlib.h>
// specify string datetime (UTC) on command line
// return seconds since 00:00:00 UTC, January 1, 1970