diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-12-02 15:29:58 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-12-02 15:29:58 +0100 |
commit | f637af457985fbcf6be5641e98df6d87ca622d24 (patch) | |
tree | 4c015188c6b5e33c1a9d88032f61a434063259fb /include/astra | |
parent | e48d0a53730bb7faa2463a64db0989ba341e12b8 (diff) | |
parent | 6d57f7874713e6632c2e49590538c6a48ddcc311 (diff) | |
download | astra-f637af457985fbcf6be5641e98df6d87ca622d24.tar.gz astra-f637af457985fbcf6be5641e98df6d87ca622d24.tar.bz2 astra-f637af457985fbcf6be5641e98df6d87ca622d24.tar.xz astra-f637af457985fbcf6be5641e98df6d87ca622d24.zip |
Merge branch 'master' into volgeom3d
Diffstat (limited to 'include/astra')
-rw-r--r-- | include/astra/CudaBackProjectionAlgorithm.h | 5 | ||||
-rw-r--r-- | include/astra/CudaBackProjectionAlgorithm3D.h | 2 | ||||
-rw-r--r-- | include/astra/CudaCglsAlgorithm.h | 9 | ||||
-rw-r--r-- | include/astra/CudaCglsAlgorithm3D.h | 2 | ||||
-rw-r--r-- | include/astra/CudaEMAlgorithm.h | 10 | ||||
-rw-r--r-- | include/astra/CudaFDKAlgorithm3D.h | 2 | ||||
-rw-r--r-- | include/astra/CudaFilteredBackProjectionAlgorithm.h | 3 | ||||
-rw-r--r-- | include/astra/CudaForwardProjectionAlgorithm.h | 29 | ||||
-rw-r--r-- | include/astra/CudaForwardProjectionAlgorithm3D.h | 1 | ||||
-rw-r--r-- | include/astra/CudaProjector2D.h | 2 | ||||
-rw-r--r-- | include/astra/CudaProjector3D.h | 2 | ||||
-rw-r--r-- | include/astra/CudaReconstructionAlgorithm2D.h | 22 | ||||
-rw-r--r-- | include/astra/CudaSartAlgorithm.h | 9 | ||||
-rw-r--r-- | include/astra/CudaSirtAlgorithm.h | 11 | ||||
-rw-r--r-- | include/astra/CudaSirtAlgorithm3D.h | 2 | ||||
-rw-r--r-- | include/astra/ReconstructionAlgorithm2D.h | 3 |
16 files changed, 50 insertions, 64 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 ecfca41..2b4bacb 100644 --- a/include/astra/CudaProjector2D.h +++ b/include/astra/CudaProjector2D.h @@ -124,12 +124,14 @@ public: 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 1d570fe..da88d6d 100644 --- a/include/astra/CudaProjector3D.h +++ b/include/astra/CudaProjector3D.h @@ -117,12 +117,14 @@ 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 |