projects
/
ctsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r7061: initial property settings
[ctsim.git]
/
libctsim
/
backprojectors.cpp
diff --git
a/libctsim/backprojectors.cpp
b/libctsim/backprojectors.cpp
index 06ad159b9d9577d73f099aee7a9586a3e19b6052..26455facaa9facfd9d2629807a9d66ec82a7362a 100644
(file)
--- a/
libctsim/backprojectors.cpp
+++ b/
libctsim/backprojectors.cpp
@@
-8,7
+8,7
@@
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id
: backprojectors.cpp,v 1.31 2001/03/11 15:27:30 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
**
** 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
@@
-25,6
+25,7
@@
******************************************************************************/
#include "ct.h"
******************************************************************************/
#include "ct.h"
+#include "interpolator.h"
const int Backprojector::BPROJ_INVALID = -1;
const int Backprojector::BPROJ_TRIG = 0;
const int Backprojector::BPROJ_INVALID = -1;
const int Backprojector::BPROJ_TRIG = 0;
@@
-34,18
+35,18
@@
const int Backprojector::BPROJ_IDIFF = 3;
const char* const Backprojector::s_aszBackprojectName[] =
{
const char* const Backprojector::s_aszBackprojectName[] =
{
-
{"trig"}
,
-
{"table"}
,
-
{"diff"}
,
-
{"idiff"}
,
+
"trig"
,
+
"table"
,
+
"diff"
,
+
"idiff"
,
};
const char* const Backprojector::s_aszBackprojectTitle[] =
{
};
const char* const Backprojector::s_aszBackprojectTitle[] =
{
-
{"Direct Trigometric"}
,
-
{"Trigometric Table"}
,
-
{"Difference Iteration"}
,
-
{"Integer Difference Iteration"}
,
+
"Direct Trigometric"
,
+
"Trigometric Table"
,
+
"Difference Iteration"
,
+
"Integer Difference Iteration"
,
};
const int Backprojector::s_iBackprojectCount = sizeof(s_aszBackprojectName) / sizeof(const char*);
};
const int Backprojector::s_iBackprojectCount = sizeof(s_aszBackprojectName) / sizeof(const char*);
@@
-64,33
+65,33
@@
const int Backprojector::INTERP_3BSPLINE = 7;
const char* const Backprojector::s_aszInterpName[] =
{
const char* const Backprojector::s_aszInterpName[] =
{
-
{"nearest"}
,
-
{"linear"}
,
-
{"cubic"}
,
+
"nearest"
,
+
"linear"
,
+
"cubic"
,
#if HAVE_FREQ_PREINTERP
#if HAVE_FREQ_PREINTERP
-
{"freq_preinterpolationj"}
,
+
"freq_preinterpolationj"
,
#endif
#if HAVE_BSPLINE_INTERP
#endif
#if HAVE_BSPLINE_INTERP
-
{"bspline"}
,
-
{"1bspline"}
,
-
{"2bspline"}
,
-
{"3bspline"}
,
+
"bspline"
,
+
"1bspline"
,
+
"2bspline"
,
+
"3bspline"
,
#endif
};
const char* const Backprojector::s_aszInterpTitle[] =
{
#endif
};
const char* const Backprojector::s_aszInterpTitle[] =
{
-
{"Nearest"}
,
-
{"Linear"}
,
-
{"Cubic"}
,
+
"Nearest"
,
+
"Linear"
,
+
"Cubic"
,
#if HAVE_FREQ_PREINTERP
#if HAVE_FREQ_PREINTERP
-
{"Frequency Preinterpolation"}
,
+
"Frequency Preinterpolation"
,
#endif
#if HAVE_BSPLINE_INTERP
#endif
#if HAVE_BSPLINE_INTERP
-
{"B-Spline"}
,
-
{"B-Spline 1st Order"}
,
-
{"B-Spline 2nd Order"}
,
-
{"B-Spline 3rd Order"}
,
+
"B-Spline"
,
+
"B-Spline 1st Order"
,
+
"B-Spline 2nd Order"
,
+
"B-Spline 3rd Order"
,
#endif
};
#endif
};
@@
-313,6
+314,9
@@
Backproject::Backproject (const Projections& proj, ImageFile& im, int interpType
xInc = (xMax - xMin) / nx; // size of cells
yInc = (yMax - yMin) / ny;
xInc = (xMax - xMin) / nx; // size of cells
yInc = (yMax - yMin) / ny;
+ im.setAxisIncrement (xInc, yInc);
+ im.setAxisExtent (xMin, xMax, yMin, yMax);
+
m_dFocalLength = proj.focalLength();
m_dSourceDetectorLength = proj.sourceDetectorLength();
}
m_dFocalLength = proj.focalLength();
m_dSourceDetectorLength = proj.sourceDetectorLength();
}