projects
/
ctsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r242: *** empty log message ***
[ctsim.git]
/
libctsim
/
array2dfile.cpp
diff --git
a/libctsim/array2dfile.cpp
b/libctsim/array2dfile.cpp
index 424ec230fe8d1717550ee6a9b1e402abe0bf1e3d..f918471f54e7278a5789f5095efddaae9f091231 100644
(file)
--- a/
libctsim/array2dfile.cpp
+++ b/
libctsim/array2dfile.cpp
@@
-9,7
+9,7
@@
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: array2dfile.cpp,v 1.
8 2000/07/29 19:50:0
8 kevin Exp $
+** $Id: array2dfile.cpp,v 1.
13 2000/12/04 04:15:4
8 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
**
** 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,8
+29,10
@@
#include <ctime>
#include <sstream>
#include <ctime>
#include <sstream>
+
using namespace std;
using namespace std;
+const kuint16 Array2dFile::m_signature = ('I'*256+'F');
///////////////////////////////////////////////////////////////////////////
// CLASS IMPLEMENTATION
///////////////////////////////////////////////////////////////////////////
// CLASS IMPLEMENTATION
@@
-59,7
+61,7
@@
Array2dFileLabel::Array2dFileLabel()
init();
}
init();
}
-Array2dFileLabel::Array2dFileLabel(const char* const str, double ctime
= 0.
)
+Array2dFileLabel::Array2dFileLabel(const char* const str, double ctime)
: m_strLabel (str)
{
init();
: m_strLabel (str)
{
init();
@@
-68,7
+70,7
@@
Array2dFileLabel::Array2dFileLabel(const char* const str, double ctime = 0.)
m_calcTime = ctime;
}
m_calcTime = ctime;
}
-Array2dFileLabel::Array2dFileLabel(const int type, const char* const str, double ctime
= 0.
)
+Array2dFileLabel::Array2dFileLabel(const int type, const char* const str, double ctime)
: m_strLabel (str)
{
init();
: m_strLabel (str)
{
init();
@@
-412,11
+414,11
@@
Array2dFile::arrayDataWrite (frnetorderstream& fs)
if (NativeBigEndian()) {
for (unsigned int iy = 0; iy < m_ny; iy++) {
ConvertReverseNetworkOrder (ptrColumn, m_pixelSize);
if (NativeBigEndian()) {
for (unsigned int iy = 0; iy < m_ny; iy++) {
ConvertReverseNetworkOrder (ptrColumn, m_pixelSize);
- fs.write (
ptrColumn
, m_pixelSize);
+ fs.write (
reinterpret_cast<const char*>(ptrColumn)
, m_pixelSize);
ptrColumn += m_pixelSize;
}
} else
ptrColumn += m_pixelSize;
}
} else
- fs.write (
ptrColumn
, columnSize);
+ fs.write (
reinterpret_cast<const char*>(ptrColumn)
, columnSize);
}
return true;
}
return true;
@@
-440,12
+442,12
@@
Array2dFile::arrayDataRead (frnetorderstream& fs)
unsigned char* ptrColumn = m_arrayData[ix];
if (NativeBigEndian()) {
for (unsigned int iy = 0; iy < m_ny; iy++) {
unsigned char* ptrColumn = m_arrayData[ix];
if (NativeBigEndian()) {
for (unsigned int iy = 0; iy < m_ny; iy++) {
- fs.read (
ptrColumn
, m_pixelSize);
+ fs.read (
reinterpret_cast<char*>(ptrColumn)
, m_pixelSize);
ConvertReverseNetworkOrder (ptrColumn, m_pixelSize);
ptrColumn += m_pixelSize;
}
} else
ConvertReverseNetworkOrder (ptrColumn, m_pixelSize);
ptrColumn += m_pixelSize;
}
} else
- fs.read (
ptrColumn
, columnSize);
+ fs.read (
reinterpret_cast<char*>(ptrColumn)
, columnSize);
}
return true;
}
return true;
@@
-521,14
+523,14
@@
Array2dFile::labelsWrite (frnetorderstream& fs)
}
void
}
void
-Array2dFile::labelAdd (const char* const lstr, double calc_time
=0.
)
+Array2dFile::labelAdd (const char* const lstr, double calc_time)
{
labelAdd (Array2dFileLabel::L_HISTORY, lstr, calc_time);
}
void
{
labelAdd (Array2dFileLabel::L_HISTORY, lstr, calc_time);
}
void
-Array2dFile::labelAdd (int type, const char* const lstr, double calc_time
=0.
)
+Array2dFile::labelAdd (int type, const char* const lstr, double calc_time)
{
Array2dFileLabel label (type, lstr, calc_time);
{
Array2dFileLabel label (type, lstr, calc_time);