X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=include%2Fprojections.h;h=eb1c3c7d03b852b4e2085eb976ab259b31e1ba8b;hp=8a916166170327ee92adcde5dffe93d6b7993c21;hb=484b9ac2ebf8f88dbe36bdc1d3a9c1b6a2b242eb;hpb=a05f3cb550877e94aa118cc04b361c0c8fdb3dc3 diff --git a/include/projections.h b/include/projections.h index 8a91616..eb1c3c7 100644 --- a/include/projections.h +++ b/include/projections.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: projections.h,v 1.13 2000/08/31 08:38:58 kevin Exp $ +** $Id: projections.h,v 1.17 2000/12/16 03:29:02 kevin Exp $ ** ** ** This program is free software; you can redistribute it and/or modify @@ -32,7 +32,7 @@ class Scanner; class DetectorArray; class Array2dFileLabel; -class ostringstream; + // Projections class Projections @@ -45,6 +45,7 @@ class Projections void initFromScanner (const Scanner& scanner); + void printProjectionData (int startView, int endView); void printProjectionData (); void printScanInfo (ostringstream& os) const; @@ -62,8 +63,8 @@ class Projections void setDetInc (double detInc) { m_detInc = detInc;} void setPhmLen (double phmLen) { m_phmLen = phmLen;} void setCalcTime (double calcTime) {m_calcTime = calcTime;} - void setRemark (const char* remark) {m_remark = remark;} - void setRemark (const string& remark) {m_remark = remark;} + void setRemark (const char* remark) {m_remark = remark; m_label.setLabelString(remark);} + void setRemark (const string& remark) {setRemark(remark.c_str());} double detStart() const {return m_detStart;} double rotStart() const {return m_rotStart;} @@ -87,11 +88,17 @@ class Projections const DetectorArray& getDetectorArray (const int iview) const { return (*m_projData[iview]); } + + static bool copyHeader (const char* const filename, std::ostream& os); + static bool copyHeader (const string& filename, std::ostream& os); + + static bool copyViewData (const char* const filename, std::ostream& os, int startView, int endView); + static bool copyViewData (const string& filename, std::ostream& os, int startView, int endView); private: int m_headerSize; // Size of disk file header int m_geometry; // Geometry of scanner - struct DetectorArray **m_projData; // Pointer to array of detarray_st pointers + class DetectorArray **m_projData; // Pointer to array of detarray_st pointers string m_remark; // description of raysum data int m_nDet; // number of detectors in array int m_nView; // number of rotated views @@ -112,12 +119,10 @@ class Projections string m_filename; Array2dFileLabel m_label; - const static kuint16 m_signature = ('P'*256 + 'J'); + const static kuint16 m_signature; - bool headerRead (); - bool headerWrite (); - bool headerRead (fnetorderstream& fs); bool headerWrite (fnetorderstream& fs); + bool headerRead (fnetorderstream& fs); void newProjData (); void deleteProjData ();