summaryrefslogtreecommitdiffstats
path: root/include/astra/cuda/2d
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2018-07-05 16:13:37 +0200
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2018-07-17 11:29:22 +0200
commitd58f6b51493c7931cbc02feb3ffeb0eca6ea3a4e (patch)
tree51a4b27c7825198ec119c4e420439f183584420a /include/astra/cuda/2d
parent0d06afc38d7a8443a079d25d72ec4b4b15353974 (diff)
downloadastra-d58f6b51493c7931cbc02feb3ffeb0eca6ea3a4e.tar.gz
astra-d58f6b51493c7931cbc02feb3ffeb0eca6ea3a4e.tar.bz2
astra-d58f6b51493c7931cbc02feb3ffeb0eca6ea3a4e.tar.xz
astra-d58f6b51493c7931cbc02feb3ffeb0eca6ea3a4e.zip
Refactor a few filter-related functions out of cuda code
Diffstat (limited to 'include/astra/cuda/2d')
-rw-r--r--include/astra/cuda/2d/astra.h1
-rw-r--r--include/astra/cuda/2d/fbp.h2
-rw-r--r--include/astra/cuda/2d/fbp_filters.h61
-rw-r--r--include/astra/cuda/2d/fft.h8
4 files changed, 5 insertions, 67 deletions
diff --git a/include/astra/cuda/2d/astra.h b/include/astra/cuda/2d/astra.h
index 6f0e2f0..a2f2219 100644
--- a/include/astra/cuda/2d/astra.h
+++ b/include/astra/cuda/2d/astra.h
@@ -28,7 +28,6 @@ along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
#ifndef _CUDA_ASTRA_H
#define _CUDA_ASTRA_H
-#include "fbp_filters.h"
#include "dims.h"
#include "algo.h"
diff --git a/include/astra/cuda/2d/fbp.h b/include/astra/cuda/2d/fbp.h
index 8666646..7febe69 100644
--- a/include/astra/cuda/2d/fbp.h
+++ b/include/astra/cuda/2d/fbp.h
@@ -26,7 +26,7 @@ along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
*/
#include "algo.h"
-#include "fbp_filters.h"
+#include "astra/Filters.h"
namespace astraCUDA {
diff --git a/include/astra/cuda/2d/fbp_filters.h b/include/astra/cuda/2d/fbp_filters.h
deleted file mode 100644
index 7c1121a..0000000
--- a/include/astra/cuda/2d/fbp_filters.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
------------------------------------------------------------------------
-Copyright: 2010-2018, imec Vision Lab, University of Antwerp
- 2014-2018, CWI, Amsterdam
-
-Contact: astra@astra-toolbox.com
-Website: http://www.astra-toolbox.com/
-
-This file is part of the ASTRA Toolbox.
-
-
-The ASTRA Toolbox is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-The ASTRA Toolbox 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 the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
-
------------------------------------------------------------------------
-*/
-
-#ifndef FBP_FILTERS_H
-#define FBP_FILTERS_H
-
-namespace astra {
-
-enum E_FBPFILTER
-{
- FILTER_NONE, //< no filter (regular BP)
- FILTER_RAMLAK, //< default FBP filter
- FILTER_SHEPPLOGAN, //< Shepp-Logan
- FILTER_COSINE, //< Cosine
- FILTER_HAMMING, //< Hamming filter
- FILTER_HANN, //< Hann filter
- FILTER_TUKEY, //< Tukey filter
- FILTER_LANCZOS, //< Lanczos filter
- FILTER_TRIANGULAR, //< Triangular filter
- FILTER_GAUSSIAN, //< Gaussian filter
- FILTER_BARTLETTHANN, //< Bartlett-Hann filter
- FILTER_BLACKMAN, //< Blackman filter
- FILTER_NUTTALL, //< Nuttall filter, continuous first derivative
- FILTER_BLACKMANHARRIS, //< Blackman-Harris filter
- FILTER_BLACKMANNUTTALL, //< Blackman-Nuttall filter
- FILTER_FLATTOP, //< Flat top filter
- FILTER_KAISER, //< Kaiser filter
- FILTER_PARZEN, //< Parzen filter
- FILTER_PROJECTION, //< all projection directions share one filter
- FILTER_SINOGRAM, //< every projection direction has its own filter
- FILTER_RPROJECTION, //< projection filter in real space (as opposed to fourier space)
- FILTER_RSINOGRAM, //< sinogram filter in real space
-};
-
-}
-
-#endif /* FBP_FILTERS_H */
diff --git a/include/astra/cuda/2d/fft.h b/include/astra/cuda/2d/fft.h
index d36cae2..f5f8477 100644
--- a/include/astra/cuda/2d/fft.h
+++ b/include/astra/cuda/2d/fft.h
@@ -31,7 +31,7 @@ along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
#include <cufft.h>
#include <cuda.h>
-#include "fbp_filters.h"
+#include "astra/Filters.h"
namespace astraCUDA {
@@ -60,9 +60,9 @@ void applyFilter(int _iProjectionCount, int _iFreqBinCount,
int calcFFTFourierSize(int _iFFTRealSize);
-void genFilter(astra::E_FBPFILTER _eFilter, float _fD, int _iProjectionCount,
- cufftComplex * _pFilter, int _iFFTRealDetectorCount,
- int _iFFTFourierDetectorCount, float _fParameter = -1.0f);
+void genCuFFTFilter(astra::E_FBPFILTER _eFilter, float _fD, int _iProjectionCount,
+ cufftComplex * _pFilter, int _iFFTRealDetectorCount,
+ int _iFFTFourierDetectorCount, float _fParameter = -1.0f);
void genIdenFilter(int _iProjectionCount, cufftComplex * _pFilter,
int _iFFTRealDetectorCount, int _iFFTFourierDetectorCount);