28template <
int num_dimensions,
typename elemT>
47 Filter1D(
const int length_v)
53 virtual ~Filter1D() {}
60 inline void apply(Array<1, T>& data);
62 inline void apply(Array<2, T>& data);
64 inline void apply(Array<3, T>& data);
66 virtual std::string parameter_info()
const = 0;
75 const int length =
filter.get_length();
82 Padded.
grow(1, length);
117 Filter2D(
int height_v,
int width_v)
120 filter(1, width_v * height_v)
123 virtual ~Filter2D() {}
127 void padd_scale_filter(
int height_proj,
int width_proj);
129 virtual std::string parameter_info()
const = 0;
144 assert(data.
get_length() == 2 * height * width);
161 fourn(data, nn, 2, 1);
162 for (j = 1, k = 1; j < width * height + 1; j++)
167 data[k++] *= filter[j] / (width * height);
168 data[k++] *= filter[j] / (width * height);
170 fourn(data, nn, 2, -1);
defines the stir::Array class for multi-dimensional (numeric) arrays
declares the stir::TimedObject class
This class defines multi-dimensional (numeric) arrays.
Definition Array.h:78
virtual void grow(const IndexRange< num_dimensions > &range)
alias for resize()
Definition Array.inl:103
Preliminary class for 1D filtering using FFTs.
Definition Filter.h:39
void apply(Array< 1, T > &data)
Filters data (which has to be in the 'spatial' domain.
Definition Filter.h:72
Array< 1, float > filter
Stores the filter in frequency space (will be private sometime)
Definition Filter.h:44
Array< 1, T > filter
Stores the filter in the 'funny' but efficient Numerical Recipes format.
Definition Filter.h:136
base class for all objects which need timers. At the moment, there's only a CPU timer.
Definition TimedObject.h:36
void stop_timers() const
stop all timers kept by this object
Definition TimedObject.inl:40
void start_timers(bool do_reset=false) const
start all timers kept by this object
Definition TimedObject.inl:33
int get_max_index() const
get value of last valid index
Definition VectorWithOffset.inl:131
int get_min_index() const
get value of first valid index
Definition VectorWithOffset.inl:124
int get_length() const
return number of elements in this vector
Definition VectorWithOffset.inl:538
void set_offset(const int min_index)
change value of starting index
Definition VectorWithOffset.inl:339
Declaration of FFT routines.
void fourn(Array< 1, float > &data, Array< 1, int > &nn, int ndim, int isign)
n-dimensional FFT
void convlvC(Array< 1, float > &data, const Array< 1, float > &filter, int n)
Convolve data with a filter which is given in frequency space.