** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: projections.h,v 1.1 2000/06/17 20:12:14 kevin Exp $
+** $Id: projections.h,v 1.7 2000/06/29 12:39:45 kevin Exp $
**
**
** This program is free software; you can redistribute it and/or modify
class Scanner;
class DetectorArray;
+class Array2dFileLabel;
+
// Projections
class Projections
Projections (void);
~Projections (void);
- void init (const int nView, const int nDet);
+ void initFromScanner (const Scanner& scanner);
void printProjectionData (void);
void printScanInfo (void) const;
bool read (const char* fname);
bool write (const char* fname);
- bool detarrayRead (DetectorArray& darray, const int view_num);
- bool detarrayWrite (const DetectorArray& darray, const int view_num);
+ bool detarrayRead (fnetorderstream& fs, DetectorArray& darray, const int view_num);
+ bool detarrayWrite (fnetorderstream& fs, const DetectorArray& darray, const int view_num);
+ bool reconstruct (ImageFile& im, const char* const filterName, double filt_param, const char* const filterMethodName, const char* const interpName, int interp_param, const char* const backprojName, const int trace);
+
+ void setNView (int nView); // used in MPI to restrict # of views
void setRotInc (double rotInc) { m_rotInc = rotInc;}
void setDetInc (double detInc) { m_detInc = detInc;}
void setPhmLen (double phmLen) { m_phmLen = phmLen;}
const double rotInc(void) const {return m_rotInc;}
const int nDet(void) const {return m_nDet;}
const int nView(void) const {return m_nView;}
+ const string& getFilename(void) const {return m_filename;}
+ Array2dFileLabel& getLabel(void) {return m_label;}
+ const Array2dFileLabel& getLabel(void) const {return m_label;}
+
DetectorArray& getDetectorArray (const int iview)
{ return (*m_projData[iview]); }
private:
- int m_fd; // Disk file descriptor
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
double m_detStart; // distance of beginning detector to center phantom
double m_detInc; // increment between detectors
double m_phmLen; // Length of phantom edge (phm is square)
+ kuint32 m_year; // Creation date & time
+ kuint32 m_month;
+ kuint32 m_day;
+ kuint32 m_hour;
+ kuint32 m_minute;
+ kuint32 m_second;
+ string m_filename;
+ Array2dFileLabel m_label;
+
+ const static kuint16 m_signature = ('P'*256 + 'J');
bool headerRead (void);
bool headerWrite (void);
+ bool headerRead (fnetorderstream& fs);
+ bool headerWrite (fnetorderstream& fs);
void newProjData (void);
void deleteProjData (void);
+
+ void init (const int nView, const int nDet);
+
+ // prevent default methods
+ Projections& operator= (const Projections& rhs); // assignment
+ Projections(const Projections& rhs); // copy
};