From: Kevin M. Rosenberg Date: Sat, 10 Jun 2000 23:00:17 +0000 (+0000) Subject: r93: *** empty log message *** X-Git-Tag: debian-4.5.3-3~924 X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=commitdiff_plain;h=c481fbf2890e6e3a0a5479a9e53e685634ce411a r93: *** empty log message *** --- diff --git a/include/Makefile.am b/include/Makefile.am index 065df98..90bd58c 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,4 +1,4 @@ -noinst_HEADERS=ascii.h cio.h ct.h ezplot.h ir.h keyboard.h kmath.h kstddef.h pol.h sgp.h array2d.h imagefile.h backproj.h mpiworld.h +noinst_HEADERS=ascii.h cio.h ct.h ezplot.h ir.h keyboard.h kmath.h kstddef.h pol.h sgp.h array2d.h imagefile.h backprojectors.h mpiworld.h diff --git a/include/backprojectors.h b/include/backprojectors.h new file mode 100644 index 0000000..923cee1 --- /dev/null +++ b/include/backprojectors.h @@ -0,0 +1,127 @@ +/***************************************************************************** +** FILE IDENTIFICATION +** +** Name: backproject.h +** Purpose: Backprojection classes +** Programmer: Kevin Rosenberg +** Date Started: June 2000 +** +** This is part of the CTSim program +** Copyright (C) 1983-2000 Kevin Rosenberg +** +** $Id: backprojectors.h,v 1.1 2000/06/10 23:00:17 kevin Exp $ +** $Log: backprojectors.h,v $ +** Revision 1.1 2000/06/10 23:00:17 kevin +** *** empty log message *** +** +** +** 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 +** published by the Free Software Foundation. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; if not, write to the Free Software +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +******************************************************************************/ + +class Backproject +{ + public: + Backproject (const RAYSUM* rs, ImageFile& im, InterpolationType interpType); + + virtual ~Backproject (); + + virtual void BackprojectView (const double* const t, const double view_angle) {}; + + protected: + void ScaleImageByRotIncrement (void); + 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); + + InterpolationType interpType; + const RAYSUM* rs; + ImageFile& im; + ImageFileArray v; + kuint32 nx; + kuint32 ny; + double det_inc; + double rot_inc; + int ncent; // index refering to L=0 projection + int ndet; + double xmin, xmax, ymin, ymax; // Retangular coords of phantom + double xinc, yinc; // size of cells + + private: + Backproject (const Backproject& rhs); + Backproject& operator= (const Backproject& rhs); +}; + + +class BackprojectTrig : public Backproject +{ + public: + BackprojectTrig (const RAYSUM* rs, ImageFile& im, InterpolationType interpType) + : Backproject::Backproject (rs, im, interpType) + {} + + void BackprojectView (const double* const t, double view_angle); +}; + + +class BackprojectTable : public Backproject +{ + public: + BackprojectTable (const RAYSUM* rs, ImageFile& im, InterpolationType interpType); + ~BackprojectTable (); + + void BackprojectView (const double* const t, double view_angle); + + private: + Array2d arrayR; + Array2d arrayPhi; + kfloat64** r; + kfloat64** phi; +}; + + +class BackprojectDiff : public Backproject +{ + public: + BackprojectDiff (const RAYSUM* rs, ImageFile& im, InterpolationType interpType); + ~BackprojectDiff (); + + void BackprojectView (const double* const t, double view_angle); + + protected: + double start_r; + double start_phi; + double im_xinc, im_yinc; +}; + +class BackprojectDiff2 : public BackprojectDiff +{ + public: + BackprojectDiff2 (const RAYSUM* rs, ImageFile& im, InterpolationType interpType) + : BackprojectDiff::BackprojectDiff (rs, im, interpType) + {} + + void BackprojectView (const double* const t, double view_angle); +}; + +class BackprojectIntDiff2 : public BackprojectDiff +{ + public: + BackprojectIntDiff2 (const RAYSUM* rs, ImageFile& im, InterpolationType interpType) + : BackprojectDiff::BackprojectDiff (rs, im, interpType) + {} + + void BackprojectView (const double* const t, double view_angle); +}; + + +Backproject* selectBackprojector (BackprojType type, const RAYSUM*, ImageFile& im, InterpolationType interpType); diff --git a/include/ct.h b/include/ct.h index 02992b3..72a01f2 100644 --- a/include/ct.h +++ b/include/ct.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ct.h,v 1.12 2000/06/09 01:35:33 kevin Exp $ +** $Id: ct.h,v 1.13 2000/06/10 23:00:17 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 @@ -140,7 +140,7 @@ using namespace std; #include "array2d.h" #include "imagefile.h" #include "ir.h" -#include "backproj.h" +#include "backprojectors.h" #endif