summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-12-01 12:27:44 +0100
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-12-01 12:27:44 +0100
commitfff0e6dba508744f540bcf5efff76f676fe7af48 (patch)
tree5f33544e7d79b59501a5dd63a4922722eed8a98b /include
parent0d5947a0e8e7d6f86c7591a96d877dfe14b187e4 (diff)
parentdcfd15335549fa8e3e56260791cc4510331f7be6 (diff)
downloadastra-fff0e6dba508744f540bcf5efff76f676fe7af48.tar.gz
astra-fff0e6dba508744f540bcf5efff76f676fe7af48.tar.bz2
astra-fff0e6dba508744f540bcf5efff76f676fe7af48.tar.xz
astra-fff0e6dba508744f540bcf5efff76f676fe7af48.zip
Merge branch 'master' into python-plugins
Conflicts: python/astra/utils.pyx
Diffstat (limited to 'include')
-rw-r--r--include/astra/CudaBackProjectionAlgorithm.h5
-rw-r--r--include/astra/CudaBackProjectionAlgorithm3D.h2
-rw-r--r--include/astra/CudaCglsAlgorithm.h9
-rw-r--r--include/astra/CudaCglsAlgorithm3D.h2
-rw-r--r--include/astra/CudaEMAlgorithm.h10
-rw-r--r--include/astra/CudaFDKAlgorithm3D.h2
-rw-r--r--include/astra/CudaFilteredBackProjectionAlgorithm.h3
-rw-r--r--include/astra/CudaForwardProjectionAlgorithm.h29
-rw-r--r--include/astra/CudaForwardProjectionAlgorithm3D.h1
-rw-r--r--include/astra/CudaProjector2D.h8
-rw-r--r--include/astra/CudaProjector3D.h7
-rw-r--r--include/astra/CudaReconstructionAlgorithm2D.h22
-rw-r--r--include/astra/CudaSartAlgorithm.h9
-rw-r--r--include/astra/CudaSirtAlgorithm.h11
-rw-r--r--include/astra/CudaSirtAlgorithm3D.h2
-rw-r--r--include/astra/ReconstructionAlgorithm2D.h3
16 files changed, 60 insertions, 65 deletions
diff --git a/include/astra/CudaBackProjectionAlgorithm.h b/include/astra/CudaBackProjectionAlgorithm.h
index 84899b0..2450376 100644
--- a/include/astra/CudaBackProjectionAlgorithm.h
+++ b/include/astra/CudaBackProjectionAlgorithm.h
@@ -85,13 +85,10 @@ public:
* @param _pProjector Projector Object. (Ignored)
* @param _pSinogram ProjectionData2D object containing the sinogram data.
* @param _pReconstruction VolumeData2D object for storing the reconstructed volume.
- * @param _iGPUindex GPU to use.
- * @param _iPixelSuperSampling Square root of number of samples per voxel, used to compute the backprojection
*/
bool initialize(CProjector2D* _pProjector,
CFloat32ProjectionData2D* _pSinogram,
- CFloat32VolumeData2D* _pReconstruction,
- int _iGPUindex = -1, int _iPixelSuperSampling = 1);
+ CFloat32VolumeData2D* _pReconstruction);
/** Get a description of the class.
*
diff --git a/include/astra/CudaBackProjectionAlgorithm3D.h b/include/astra/CudaBackProjectionAlgorithm3D.h
index 2d98218..74aeec8 100644
--- a/include/astra/CudaBackProjectionAlgorithm3D.h
+++ b/include/astra/CudaBackProjectionAlgorithm3D.h
@@ -147,6 +147,8 @@ protected:
*/
bool m_bSIRTWeighting;
+
+ void initializeFromProjector();
};
// inline functions
diff --git a/include/astra/CudaCglsAlgorithm.h b/include/astra/CudaCglsAlgorithm.h
index c51093c..6aa0343 100644
--- a/include/astra/CudaCglsAlgorithm.h
+++ b/include/astra/CudaCglsAlgorithm.h
@@ -91,18 +91,13 @@ public:
/** Initialize class, use sequential order.
*
- * @param _pProjector Projector Object. (Ignored)
+ * @param _pProjector Projector Object. (Optional)
* @param _pSinogram ProjectionData2D object containing the sinogram
* @param _pReconstruction VolumeData2D for storing the reconstruction
- * @param _iGPUindex Index of GPU to use. (Starting at 0.)
- * @param _iDetectorSuperSampling Supersampling factor for the FP.
- * @param _iPixelSuperSampling Square root of number of samples per voxel, used to compute the backprojection
*/
bool initialize(CProjector2D* _pProjector,
CFloat32ProjectionData2D* _pSinogram,
- CFloat32VolumeData2D* _pReconstruction,
- int _iGPUindex = -1, int _iDetectorSuperSampling = 1,
- int _iPixelSuperSampling = 1);
+ CFloat32VolumeData2D* _pReconstruction);
/** Get a description of the class.
*
diff --git a/include/astra/CudaCglsAlgorithm3D.h b/include/astra/CudaCglsAlgorithm3D.h
index 77c41c1..3e4084b 100644
--- a/include/astra/CudaCglsAlgorithm3D.h
+++ b/include/astra/CudaCglsAlgorithm3D.h
@@ -161,6 +161,8 @@ protected:
bool m_bAstraCGLSInit;
int m_iDetectorSuperSampling;
int m_iVoxelSuperSampling;
+
+ void initializeFromProjector();
};
// inline functions
diff --git a/include/astra/CudaEMAlgorithm.h b/include/astra/CudaEMAlgorithm.h
index 97eb7ca..a9d2711 100644
--- a/include/astra/CudaEMAlgorithm.h
+++ b/include/astra/CudaEMAlgorithm.h
@@ -63,17 +63,13 @@ public:
/** Initialize class.
*
- * @param _pProjector Projector Object. (Ignored)
+ * @param _pProjector Projector Object. (Optional)
* @param _pSinogram ProjectionData2D object containing the sinogram data.
* @param _pReconstruction VolumeData2D object for storing the reconstructed volume.
- * @param _iGPUindex GPU to use.
- * @param _iDetectorSuperSampling Supersampling factor for the FP.
*/
bool initialize(CProjector2D* _pProjector,
- CFloat32ProjectionData2D* _pSinogram,
- CFloat32VolumeData2D* _pReconstruction,
- int _iGPUindex = -1, int _iDetectorSuperSampling = 1,
- int _iPixelSuperSampling = 1);
+ CFloat32ProjectionData2D* _pSinogram,
+ CFloat32VolumeData2D* _pReconstruction);
/** Get a description of the class.
*
diff --git a/include/astra/CudaFDKAlgorithm3D.h b/include/astra/CudaFDKAlgorithm3D.h
index 1b025f1..63f07fd 100644
--- a/include/astra/CudaFDKAlgorithm3D.h
+++ b/include/astra/CudaFDKAlgorithm3D.h
@@ -152,6 +152,8 @@ protected:
int m_iGPUIndex;
int m_iVoxelSuperSampling;
bool m_bShortScan;
+
+ void initializeFromProjector();
};
// inline functions
diff --git a/include/astra/CudaFilteredBackProjectionAlgorithm.h b/include/astra/CudaFilteredBackProjectionAlgorithm.h
index 33445b6..cf1f19f 100644
--- a/include/astra/CudaFilteredBackProjectionAlgorithm.h
+++ b/include/astra/CudaFilteredBackProjectionAlgorithm.h
@@ -85,6 +85,9 @@ protected:
AstraFBP* m_pFBP;
bool m_bAstraFBPInit;
+
+ void initializeFromProjector();
+ virtual bool requiresProjector() const { return false; }
};
// inline functions
diff --git a/include/astra/CudaForwardProjectionAlgorithm.h b/include/astra/CudaForwardProjectionAlgorithm.h
index d172a7a..449a610 100644
--- a/include/astra/CudaForwardProjectionAlgorithm.h
+++ b/include/astra/CudaForwardProjectionAlgorithm.h
@@ -33,16 +33,15 @@ $Id$
#include "Algorithm.h"
-#include "ParallelProjectionGeometry2D.h"
-#include "VolumeGeometry2D.h"
-
-#include "Float32ProjectionData2D.h"
-#include "Float32VolumeData2D.h"
-
#ifdef ASTRA_CUDA
namespace astra {
+class CProjector2D;
+class CProjectionGeometry2D;
+class CFloat32ProjectionData2D;
+class CFloat32VolumeData2D;
+
/**
* \brief
* This class contains a GPU implementation of an algorithm that creates a forward projection
@@ -91,19 +90,15 @@ public:
/** Initialize class.
*
- * @param _pVolumeGeometry Geometry of the volume.
- * @param _pProjectionGeometry Geometry of the projection.
+ * @param _pProjector Projector2D object. (Optional)
* @param _pVolume VolumeData2D object containing the phantom to compute sinogram from
* @param _pSinogram ProjectionData2D object to store sinogram data in.
- * @param _iGPUindex Index of GPU to use. (Starting at 0.)
- * @param _iDetectorSuperSampling Number of samples per detector element, used to compute the forward projection
* @return success
*/
- bool initialize(CProjectionGeometry2D* _pProjectionGeometry,
- CVolumeGeometry2D* _pVolumeGeometry,
- CFloat32VolumeData2D* _pVolume,
- CFloat32ProjectionData2D* _pSinogram,
- int _iGPUindex = -1, int _iDetectorSuperSampling = 1);
+ bool initialize(CProjector2D* _pProjector,
+ CFloat32VolumeData2D* _pVolume,
+ CFloat32ProjectionData2D* _pSinogram);
+
/** Get all information parameters
*
@@ -147,6 +142,9 @@ public:
void setGPUIndex(int _iGPUIndex);
protected:
+ //< Optional Projector2D object
+ CProjector2D* m_pProjector;
+
//< ProjectionData2D object containing the sinogram.
CFloat32ProjectionData2D* m_pSinogram;
//< VolumeData2D object containing the phantom.
@@ -157,6 +155,7 @@ protected:
//< Number of rays per detector element
int m_iDetectorSuperSampling;
+ void initializeFromProjector();
};
// inline functions
diff --git a/include/astra/CudaForwardProjectionAlgorithm3D.h b/include/astra/CudaForwardProjectionAlgorithm3D.h
index bdd1356..4198d56 100644
--- a/include/astra/CudaForwardProjectionAlgorithm3D.h
+++ b/include/astra/CudaForwardProjectionAlgorithm3D.h
@@ -122,6 +122,7 @@ protected:
int m_iGPUIndex;
int m_iDetectorSuperSampling;
+ void initializeFromProjector();
};
// inline functions
diff --git a/include/astra/CudaProjector2D.h b/include/astra/CudaProjector2D.h
index a571851..2b4bacb 100644
--- a/include/astra/CudaProjector2D.h
+++ b/include/astra/CudaProjector2D.h
@@ -121,9 +121,17 @@ public:
virtual std::string description() const;
+ Cuda2DProjectionKernel getProjectionKernel() const { return m_projectionKernel; }
+ int getVoxelSuperSampling() const { return m_iVoxelSuperSampling; }
+ int getDetectorSuperSampling() const { return m_iDetectorSuperSampling; }
+ int getGPUIndex() const { return m_iGPUIndex; }
+
protected:
Cuda2DProjectionKernel m_projectionKernel;
+ int m_iVoxelSuperSampling;
+ int m_iDetectorSuperSampling;
+ int m_iGPUIndex;
};
//----------------------------------------------------------------------------------------
diff --git a/include/astra/CudaProjector3D.h b/include/astra/CudaProjector3D.h
index a181531..da88d6d 100644
--- a/include/astra/CudaProjector3D.h
+++ b/include/astra/CudaProjector3D.h
@@ -115,11 +115,16 @@ public:
Cuda3DProjectionKernel getProjectionKernel() const { return m_projectionKernel; }
+ int getVoxelSuperSampling() const { return m_iVoxelSuperSampling; }
+ int getDetectorSuperSampling() const { return m_iDetectorSuperSampling; }
+ int getGPUIndex() const { return m_iGPUIndex; }
protected:
Cuda3DProjectionKernel m_projectionKernel;
-
+ int m_iVoxelSuperSampling;
+ int m_iDetectorSuperSampling;
+ int m_iGPUIndex;
};
diff --git a/include/astra/CudaReconstructionAlgorithm2D.h b/include/astra/CudaReconstructionAlgorithm2D.h
index e19bb8f..dc93a1a 100644
--- a/include/astra/CudaReconstructionAlgorithm2D.h
+++ b/include/astra/CudaReconstructionAlgorithm2D.h
@@ -70,28 +70,13 @@ public:
/** Initialize class.
*
- * @param _pProjector Projector Object. (Ignored)
+ * @param _pProjector Projector Object. (Optional)
* @param _pSinogram ProjectionData2D object containing the sinogram data.
* @param _pReconstruction VolumeData2D object for storing the reconstructed volume.
*/
- bool initialize(CProjector2D* _pProjector,
- CFloat32ProjectionData2D* _pSinogram,
- CFloat32VolumeData2D* _pReconstruction);
-
- /** Initialize class.
- *
- * @param _pProjector Projector Object. (Ignored)
- * @param _pSinogram ProjectionData2D object containing the sinogram data.
- * @param _pReconstruction VolumeData2D object for storing the reconstructed volume.
- * @param _iGPUindex GPU to use.
- * @param _iDetectorSuperSampling Supersampling factor for the FP.
- * @param _iPixelSuperSampling Square root of number of samples per voxel, used to compute the backprojection
- */
virtual bool initialize(CProjector2D* _pProjector,
CFloat32ProjectionData2D* _pSinogram,
- CFloat32VolumeData2D* _pReconstruction,
- int _iGPUindex = -1, int _iDetectorSuperSampling = 1,
- int _iPixelSuperSampling = 1);
+ CFloat32VolumeData2D* _pReconstruction);
/** Clear this class.
@@ -166,6 +151,9 @@ protected:
int m_iGPUIndex;
bool m_bAlgoInit;
+
+ void initializeFromProjector();
+ virtual bool requiresProjector() const { return false; }
};
// inline functions
diff --git a/include/astra/CudaSartAlgorithm.h b/include/astra/CudaSartAlgorithm.h
index b370bd0..c22dc4f 100644
--- a/include/astra/CudaSartAlgorithm.h
+++ b/include/astra/CudaSartAlgorithm.h
@@ -84,16 +84,13 @@ public:
/** Initialize class.
*
- * @param _pProjector Projector Object. (Ignored)
+ * @param _pProjector Projector Object. (Optional)
* @param _pSinogram ProjectionData2D object containing the sinogram data.
* @param _pReconstruction VolumeData2D object for storing the reconstructed volume.
- * @param _iGPUindex GPU to use.
- * @param _iDetectorSuperSampling Supersampling factor for the FP.
*/
bool initialize(CProjector2D* _pProjector,
- CFloat32ProjectionData2D* _pSinogram,
- CFloat32VolumeData2D* _pReconstruction,
- int _iGPUindex = -1, int _iDetectorSuperSampling = 1);
+ CFloat32ProjectionData2D* _pSinogram,
+ CFloat32VolumeData2D* _pReconstruction);
/** Get a description of the class.
*
diff --git a/include/astra/CudaSirtAlgorithm.h b/include/astra/CudaSirtAlgorithm.h
index 607889a..929ac30 100644
--- a/include/astra/CudaSirtAlgorithm.h
+++ b/include/astra/CudaSirtAlgorithm.h
@@ -97,18 +97,13 @@ public:
/** Initialize class.
*
- * @param _pProjector Projector Object. (Ignored)
+ * @param _pProjector Projector Object. (Optional)
* @param _pSinogram ProjectionData2D object containing the sinogram data.
* @param _pReconstruction VolumeData2D object for storing the reconstructed volume.
- * @param _iGPUindex GPU to use.
- * @param _iDetectorSuperSampling Supersampling factor for the FP.
- * @param _iPixelSuperSampling Square root of number of samples per voxel, used to compute the backprojection
*/
bool initialize(CProjector2D* _pProjector,
- CFloat32ProjectionData2D* _pSinogram,
- CFloat32VolumeData2D* _pReconstruction,
- int _iGPUindex = -1, int _iDetectorSuperSampling = 1,
- int _iPixelSuperSampling = 1);
+ CFloat32ProjectionData2D* _pSinogram,
+ CFloat32VolumeData2D* _pReconstruction);
/** Get a description of the class.
*
diff --git a/include/astra/CudaSirtAlgorithm3D.h b/include/astra/CudaSirtAlgorithm3D.h
index fda4635..379720e 100644
--- a/include/astra/CudaSirtAlgorithm3D.h
+++ b/include/astra/CudaSirtAlgorithm3D.h
@@ -175,6 +175,8 @@ protected:
bool m_bAstraSIRTInit;
int m_iDetectorSuperSampling;
int m_iVoxelSuperSampling;
+
+ void initializeFromProjector();
};
// inline functions
diff --git a/include/astra/ReconstructionAlgorithm2D.h b/include/astra/ReconstructionAlgorithm2D.h
index 60584e0..ac87c4f 100644
--- a/include/astra/ReconstructionAlgorithm2D.h
+++ b/include/astra/ReconstructionAlgorithm2D.h
@@ -208,6 +208,9 @@ protected:
//< Use the fixed reconstruction mask?
bool m_bUseSinogramMask;
+
+ //< Specify if initialize/check should check for a valid Projector
+ virtual bool requiresProjector() const { return true; }
};
// inline functions