diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2018-07-13 14:48:19 +0200 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2018-07-17 11:30:05 +0200 |
commit | da434892133fe0979c5e8ef8be277673452e7728 (patch) | |
tree | 067a82c2e5daa55fc49447599fc64b73132a6416 /include | |
parent | d32df3bcd1910f56195e828a0f7fba8fc04b90ab (diff) | |
download | astra-da434892133fe0979c5e8ef8be277673452e7728.tar.gz astra-da434892133fe0979c5e8ef8be277673452e7728.tar.bz2 astra-da434892133fe0979c5e8ef8be277673452e7728.tar.xz astra-da434892133fe0979c5e8ef8be277673452e7728.zip |
Add filter size error reporting
Diffstat (limited to 'include')
-rw-r--r-- | include/astra/Filters.h | 10 | ||||
-rw-r--r-- | include/astra/cuda/2d/fft.h | 2 |
2 files changed, 9 insertions, 3 deletions
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); |