** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: array2dfile.h,v 1.14 2001/01/01 10:14:34 kevin Exp $
+** $Id: array2dfile.h,v 1.18 2001/01/02 16:02:12 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
#include <sys/types.h>
#include <cstring>
-#include <string>\r
+#include <string>
#include <iosfwd>
-#include <iomanip>\r
-#include <fstream>\r
-#include <iostream>\r
+#include <iomanip>
+#include <fstream>
+#include <iostream>
#include <vector>
#include "ctsupport.h"
#include "fnetorderstream.h"
const std::string& getDateString () const;
void print (std::ostream& os) const;
+ void printBrief (std::ostream& os) const;
+ void printBrief (std::ostringstream& os) const;
Array2dFileLabel (const Array2dFileLabel& rhs);
PIXEL_FLOAT32 = 7,
PIXEL_FLOAT64 = 8,
};
-\r
- enum {\r
- DATA_TYPE_INVALID = 0,\r
- DATA_TYPE_REAL,\r
- DATA_TYPE_COMPLEX,\r
- };\r
+
+ enum {
+ DATA_TYPE_INVALID = 0,
+ DATA_TYPE_REAL,
+ DATA_TYPE_COMPLEX,
+ };
Array2dFile (int nx, int ny, int pixelSize, int pixelFormat = PIXEL_INVALID, int dataType = DATA_TYPE_REAL);
Array2dFile (void);
void labelAdd (int type, const char* const m_strLabel, double calc_time=0.);
- void labelsCopy (Array2dFile& file, const char* const idStr = NULL);
+ void labelsCopy (const Array2dFile& file, const char* const idStr = NULL);
void setPixelFormat (int type)
{ m_pixelFormat = type; }
kuint32 ny (void) const
{ return m_ny; }
-\r
- bool isComplex() const\r
- { return m_dataType == DATA_TYPE_COMPLEX; }\r
-\r
- bool isReal() const\r
- { return m_dataType == DATA_TYPE_REAL; }\r
-\r
- int dataType () const\r
- { return static_cast<int>(m_dataType); }\r
-\r
- void setDataType (int dataType)\r
- { m_dataType = dataType; }\r
+
+ bool isComplex() const
+ { return m_dataType == DATA_TYPE_COMPLEX; }
+
+ bool isReal() const
+ { return m_dataType == DATA_TYPE_REAL; }
+
+ int dataType () const
+ { return static_cast<int>(m_dataType); }
+
+ void setDataType (int dataType)
+ { m_dataType = dataType; }
void setAxisIncrement (double axisIncX, double axisIncY);
- bool reallocRealToComplex ();\r
-\r
- bool reallocComplexToReal ();\r
+ bool reallocRealToComplex ();
+
+ bool reallocComplexToReal ();
- void getPixelValueRange (double& pvmin, double& pvmax) const;\r
+ void getPixelValueRange (double& pvmin, double& pvmax) const;
void setAxisExtent (double minX, double maxX, double minY, double maxY);
void doPixelOffsetScale (double offset, double scale);
{ return m_filename; }
void printLabels (std::ostream& os) const;
+ void printLabelsBrief (std::ostream& os) const;
+ void printLabelsBrief (std::ostringstream& os) const;
+
+ unsigned int nLabels() const
+ { return m_labels.size(); }
typedef std::vector<Array2dFileLabel*>::iterator labelIterator;
typedef std::vector<Array2dFileLabel*>::const_iterator constLabelIterator;
kuint32 m_ny;
kuint32 m_arraySize;
labelContainer m_labels;
- kuint16 m_numFileLabels;\r
+ kuint16 m_numFileLabels;
kuint16 m_dataType;
unsigned char** m_arrayData;
- unsigned char** m_imaginaryArrayData;\r
+ unsigned char** m_imaginaryArrayData;
private:
void init (void);
void allocArrays ();
void freeArrays ();
-\r
- void allocArray (unsigned char**& rppData);\r
- void freeArray (unsigned char**& rppData);\r
+
+ void allocArray (unsigned char**& rppData);
+ void freeArray (unsigned char**& rppData);
Array2dFile (const Array2dFile& rhs); // copy constructor
Array2dFile& operator= (const Array2dFile&); // assignment operator