X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=include%2Fbackprojectors.h;h=5e897cd22795ed259d00317ffcf0cc91e0ef4951;hp=ce5b108da83e4925ae7c1aae422f7cfa8d236f18;hb=1a050c98763fbbc0662731b0b76953acede6f5d7;hpb=7df269f65639c1a862a58649c48331824029128a diff --git a/include/backprojectors.h b/include/backprojectors.h index ce5b108..5e897cd 100644 --- a/include/backprojectors.h +++ b/include/backprojectors.h @@ -1,15 +1,15 @@ /***************************************************************************** ** FILE IDENTIFICATION ** -** Name: backproject.h +** Name: backproject.h ** Purpose: Backprojection classes -** Programmer: Kevin Rosenberg -** Date Started: June 2000 +** Programmer: Kevin Rosenberg +** Date Started: June 2000 ** ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: backprojectors.h,v 1.23 2001/02/23 02:06:01 kevin Exp $ +** $Id$ ** ** 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 @@ -37,6 +37,7 @@ class Backproject; class ImageFile; class Projections; +struct ReconstructionROI; class Backprojector { @@ -59,10 +60,11 @@ class Backprojector static const int INTERP_3BSPLINE; #endif - Backprojector (const Projections& proj, ImageFile& im, const char* const backprojName, const char* const interpName, const int interpFactor); + Backprojector (const Projections& proj, ImageFile& im, const char* const backprojName, + const char* const interpName, const int interpFactor, const ReconstructionROI* pROI); ~Backprojector (); - + void BackprojectView (const double* const viewData, const double viewAngle); void PostProcessing(); @@ -101,14 +103,16 @@ class Backprojector static const char* const s_aszInterpTitle[]; static const int s_iInterpCount; - bool initBackprojector (const Projections& proj, ImageFile& im, const char* const backprojName, const char* const interpName, const int interpFactor); + bool initBackprojector (const Projections& proj, ImageFile& im, const char* const backprojName, + const char* const interpName, const int interpFactor, const ReconstructionROI* pROI); }; class Backproject { public: - Backproject (const Projections& proj, ImageFile& im, int interpID, const int interpFactor); + Backproject (const Projections& proj, ImageFile& im, int interpID, const int interpFactor, + const ReconstructionROI* pROI); virtual ~Backproject (); @@ -117,8 +121,8 @@ class Backproject protected: void ScaleImageByRotIncrement (); - void Backproject::errorIndexOutsideDetector (int ix, int iy, double theta, double r, double phi, double L, int ni); - void Backproject::errorIndexOutsideDetector (int ix, int iy, double theta, double L, int ni); + void errorIndexOutsideDetector (int ix, int iy, double theta, double r, double phi, double L, int ni); + void errorIndexOutsideDetector (int ix, int iy, double theta, double L, int ni); const Projections& proj; ImageFile& im; int interpType; @@ -127,12 +131,13 @@ class Backproject kint32 ny; double detInc; double rotScale; - int iDetCenter; // index refering to L=0 projection + int iDetCenter; // index refering to L=0 projection int nDet; double xMin, xMax, yMin, yMax; // Retangular coords of phantom - double xInc, yInc; // size of cells + double xInc, yInc; // size of cells int m_interpFactor; double m_dFocalLength; + double m_dSourceDetectorLength; bool m_bPostProcessingDone; private: @@ -144,8 +149,8 @@ class Backproject class BackprojectTrig : public Backproject { public: - BackprojectTrig (const Projections& proj, ImageFile& im, int interpID, const int interpFactor) - : Backproject (proj, im, interpID, interpFactor) + BackprojectTrig (const Projections& proj, ImageFile& im, int interpID, const int interpFactor, const ReconstructionROI* pROI) + : Backproject (proj, im, interpID, interpFactor, pROI) {} void BackprojectView (const double* const t, const double view_angle); @@ -155,7 +160,7 @@ class BackprojectTrig : public Backproject class BackprojectTable : public Backproject { public: - BackprojectTable (const Projections& proj, ImageFile& im, int interpID, const int interpFactor); + BackprojectTable (const Projections& proj, ImageFile& im, int interpID, const int interpFactor, const ReconstructionROI* pROI); virtual ~BackprojectTable (); virtual void BackprojectView (const double* const t, const double view_angle); @@ -172,7 +177,7 @@ class BackprojectTable : public Backproject class BackprojectDiff : public Backproject { public: - BackprojectDiff (const Projections& proj, ImageFile& im, int interpID, const int interpFactor); + BackprojectDiff (const Projections& proj, ImageFile& im, int interpID, const int interpFactor, const ReconstructionROI* pROI); ~BackprojectDiff (); virtual void BackprojectView (const double* const t, const double view_angle); @@ -188,18 +193,18 @@ class BackprojectDiff : public Backproject class BackprojectIntDiff : public BackprojectDiff { public: - BackprojectIntDiff (const Projections& proj, ImageFile& im, int interpID, const int interpFactor) - : BackprojectDiff (proj, im, interpID, interpFactor) + BackprojectIntDiff (const Projections& proj, ImageFile& im, int interpID, const int interpFactor, const ReconstructionROI* pROI) + : BackprojectDiff (proj, im, interpID, interpFactor, pROI) {} - + void BackprojectView (const double* const t, const double view_angle); }; class BackprojectEquilinear : public BackprojectTable { public: - BackprojectEquilinear (const Projections& proj, ImageFile& im, int interpID, const int interpFactor) - : BackprojectTable (proj, im, interpID, interpFactor) + BackprojectEquilinear (const Projections& proj, ImageFile& im, int interpID, const int interpFactor, const ReconstructionROI* pROI) + : BackprojectTable (proj, im, interpID, interpFactor, pROI) {} void BackprojectView (const double* const t, const double view_angle); @@ -211,8 +216,8 @@ class BackprojectEquilinear : public BackprojectTable class BackprojectEquiangular : public BackprojectTable { public: - BackprojectEquiangular (const Projections& proj, ImageFile& im, int interpID, const int interpFactor) - : BackprojectTable (proj, im, interpID, interpFactor) + BackprojectEquiangular (const Projections& proj, ImageFile& im, int interpID, const int interpFactor, const ReconstructionROI* pROI) + : BackprojectTable (proj, im, interpID, interpFactor, pROI) {} void BackprojectView (const double* const t, const double view_angle);