STIR  6.2.0
MaximalArrayFilter3D.h
Go to the documentation of this file.
1 //
2 /*
3  Copyright (C) 2006 - 2007, Hammersmith Imanet Ltd
4  Copyright (C) 2010 - 2013, King's College London
5  This file is part of STIR.
6 
7  SPDX-License-Identifier: Apache-2.0
8 
9  See STIR/LICENSE.txt for details
10  */
20 #ifndef __stir_MaximalArrayFilter3D_H__
21 #define __stir_MaximalArrayFilter3D_H__
22 
24 
25 START_NAMESPACE_STIR
26 
27 template <typename coordT>
28 class Coordinate3D;
29 
49 template <typename elemT>
51 {
52 public:
53  explicit MaximalArrayFilter3D(const Coordinate3D<int>& mask_radius);
55  bool is_trivial() const override;
56 
57 private:
58  int mask_radius_x;
59  int mask_radius_y;
60  int mask_radius_z;
61 
62  void do_it(Array<3, elemT>& out_array, const Array<3, elemT>& in_array) const override;
63 
65 
67  int extract_neighbours(Array<1, elemT>&, const Array<3, elemT>& array, const Coordinate3D<int>&) const;
68 };
69 
70 END_NAMESPACE_STIR
71 
72 #endif
Implements erosion on 3D arrays.
Definition: MaximalArrayFilter3D.h:50
A convenience class for children of ArrayFunctionObject. It implements the in-place operator() in ter...
Definition: ArrayFunctionObject_2ArgumentImplementation.h:41
Declaration of class stir::ArrayFunctionObject_2ArgumentImplementation.
The 1-dimensional (partial) specialisation of Array.
Definition: Array.h:339