From da434892133fe0979c5e8ef8be277673452e7728 Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Fri, 13 Jul 2018 14:48:19 +0200
Subject: Add filter size error reporting

---
 include/astra/Filters.h     | 10 +++++++++-
 include/astra/cuda/2d/fft.h |  2 --
 2 files changed, 9 insertions(+), 3 deletions(-)

(limited to 'include')

diff --git a/include/astra/Filters.h b/include/astra/Filters.h
index eec2ba2..bf0fb48 100644
--- a/include/astra/Filters.h
+++ b/include/astra/Filters.h
@@ -32,6 +32,7 @@ namespace astra {
 
 struct Config;
 class CAlgorithm;
+class CProjectionGeometry2D;
 
 enum E_FBPFILTER
 {
@@ -68,9 +69,11 @@ struct SFilterConfig {
 
 	float *m_pfCustomFilter;
 	int m_iCustomFilterWidth;
+	int m_iCustomFilterHeight;
 
 	SFilterConfig() : m_eType(FILTER_ERROR), m_fD(1.0f), m_fParameter(-1.0f),
-	                  m_pfCustomFilter(0), m_iCustomFilterWidth(0) { };
+	                  m_pfCustomFilter(0), m_iCustomFilterWidth(0),
+	                  m_iCustomFilterHeight(0) { };
 };
 
 // Generate filter of given size and parameters. Returns newly allocated array.
@@ -83,6 +86,11 @@ E_FBPFILTER convertStringToFilter(const char * _filterType);
 
 SFilterConfig getFilterConfigForAlgorithm(const Config& _cfg, CAlgorithm *_alg);
 
+bool checkCustomFilterSize(const SFilterConfig &_cfg, const CProjectionGeometry2D &_geom);
+
+int calcFFTFourierSize(int _iFFTRealSize);
+
+
 }
 
 #endif
diff --git a/include/astra/cuda/2d/fft.h b/include/astra/cuda/2d/fft.h
index 33612a0..f77cbde 100644
--- a/include/astra/cuda/2d/fft.h
+++ b/include/astra/cuda/2d/fft.h
@@ -58,8 +58,6 @@ bool runCudaIFFT(int _iProjectionCount, const cufftComplex* _pDevSourceComplex,
 void applyFilter(int _iProjectionCount, int _iFreqBinCount,
                  cufftComplex * _pSinogram, cufftComplex * _pFilter);
 
-int calcFFTFourierSize(int _iFFTRealSize);
-
 void genCuFFTFilter(const astra::SFilterConfig &_cfg, int _iProjectionCount,
                    cufftComplex * _pFilter, int _iFFTRealDetectorCount,
                    int _iFFTFourierDetectorCount);
-- 
cgit v1.2.3