** Date Started: July 1, 1984
**
** This is part of the CTSim program
** Date Started: July 1, 1984
**
** This is part of the CTSim program
**
** 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
static bool compareByTheta (ParallelRaysumCoordinate* a, ParallelRaysumCoordinate* b)
{ return a->m_dTheta == b->m_dTheta ? b->m_dT > a->m_dT : b->m_dTheta > a->m_dTheta; }
static bool compareByTheta (ParallelRaysumCoordinate* a, ParallelRaysumCoordinate* b)
{ return a->m_dTheta == b->m_dTheta ? b->m_dT > a->m_dT : b->m_dTheta > a->m_dTheta; }
- ParallelRaysums (Projections* pProjections);
+
+ enum {
+ THETA_RANGE_UNCONSTRAINED = 0,
+ THETA_RANGE_NORMALIZE_TO_TWOPI,
+ THETA_RANGE_FOLD_TO_PI,
+ };
+
+ ParallelRaysums (const Projections* pProjections, int iThetaRange);
void getLimits (double* dMinT, double* dMaxT, double* dMinTheta, double* dMaxTheta) const;
CoordinateContainer& getSortedByT();
CoordinateContainer& getSortedByTheta();
void getLimits (double* dMinT, double* dMaxT, double* dMinTheta, double* dMaxTheta) const;
CoordinateContainer& getSortedByT();
CoordinateContainer& getSortedByTheta();
- double interpolate (double* pdX, double* pdY, int n, double dXValue);
+ double interpolate (double* pdX, double* pdY, int n, double dXValue, int* iLastFloor = NULL);
void getThetaAndRaysumsForT (int iT, double* pdTheta, double* pdRaysum);
void getDetPositions (double* pdDetPos);
void getThetaAndRaysumsForT (int iT, double* pdTheta, double* pdRaysum);
void getDetPositions (double* pdDetPos);
CoordinateContainer m_vecpCoordinates;
CoordinateContainer m_vecpSortedByT;
CoordinateContainer m_vecpSortedByTheta;
CoordinateContainer m_vecpCoordinates;
CoordinateContainer m_vecpSortedByT;
CoordinateContainer m_vecpSortedByTheta;
bool read (const std::string& fname);
bool read (const char* fname);
bool write (const char* fname);
bool read (const std::string& fname);
bool read (const char* fname);
bool write (const char* fname);
bool detarrayRead (fnetorderstream& fs, DetectorArray& darray, const int view_num);
bool detarrayWrite (fnetorderstream& fs, 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 convertPolar (ImageFile& rIF, int iInterpolation);
bool convertFFTPolar (ImageFile& rIF, int iInterpolation, int iZeropad);
bool convertPolar (ImageFile& rIF, int iInterpolation);
bool convertFFTPolar (ImageFile& rIF, int iInterpolation, int iZeropad);
- bool calcArrayPolarCoordinates (unsigned int nx, unsigned int ny, double** ppdView, double** ppdDet);
+ void calcArrayPolarCoordinates (unsigned int nx, unsigned int ny, double** ppdView, double** ppdDet,
+ int iNumDetWithZeros, double dZeropadRatio, double dDetInc);
void interpolatePolar (ImageFileArray& v, ImageFileArray& vImag, unsigned int nx, unsigned int ny, std::complex<double>** ppcDetValue,
void interpolatePolar (ImageFileArray& v, ImageFileArray& vImag, unsigned int nx, unsigned int ny, std::complex<double>** ppcDetValue,
- double** ppdDet, double** ppdView, unsigned int nView, unsigned int nDet, int iInterpolate);
+ double** ppdDet, double** ppdView, unsigned int nView, unsigned int nDet, unsigned int nDetWithZeros,
+ int iInterpolate);
bool reconstruct (ImageFile& im, const char* const filterName, double filt_param, const char* const filterMethodName, const int zeropad, const char* frequencyFilterName, const char* const interpName, int interp_param, const char* const backprojName, const int trace) const;
bool reconstruct (ImageFile& im, const char* const filterName, double filt_param, const char* const filterMethodName, const int zeropad, const char* frequencyFilterName, const char* const interpName, int interp_param, const char* const backprojName, const int trace) const;
static bool copyViewData (const char* const filename, std::ostream& os, int startView, int endView);
static bool copyViewData (const std::string& filename, std::ostream& os, int startView, int endView);
static bool copyViewData (const char* const filename, std::ostream& os, int startView, int endView);
static bool copyViewData (const std::string& filename, std::ostream& os, int startView, int endView);
- int m_headerSize; // Size of disk file header
- int m_geometry; // Geometry of scanner
- class DetectorArray **m_projData; // Pointer to array of detarray_st pointers
- std::string m_remark; // description of raysum data
- int m_nDet; // number of detectors in array
- int m_nView; // number of rotated views
- double m_calcTime; // time required to calculate raysums
- double m_rotStart; // starting view rotation
- double m_rotInc; // angle between rotations
- double m_detStart; // distance of beginning detector to center phantom
- double m_detInc; // increment between detectors
+ int m_headerSize; // Size of disk file header
+ int m_geometry; // Geometry of scanner
+ class DetectorArray **m_projData; // Pointer to array of detarray_st pointers
+ std::string m_remark; // description of raysum data
+ int m_nDet; // number of detectors in array
+ int m_nView; // number of rotated views
+ double m_calcTime; // time required to calculate raysums
+ double m_rotStart; // starting view rotation
+ double m_rotInc; // angle between rotations
+ double m_detStart; // distance of beginning detector to center phantom
+ double m_detInc; // increment between detectors