STIR  6.2.0
TruncateToCylindricalFOVImageProcessor.h
Go to the documentation of this file.
1 //
2 //
3 /*
4  Copyright (C) 2005- 2007, Hammersmith Imanet Ltd
5  This file is part of STIR.
6 
7  SPDX-License-Identifier: Apache-2.0
8 
9  See STIR/LICENSE.txt for details
10 */
21 #ifndef __stir_TruncateToCylindricalFOVImageProcessor_H__
22 #define __stir_TruncateToCylindricalFOVImageProcessor_H__
23 
25 #include "stir/DataProcessor.h"
27 
28 START_NAMESPACE_STIR
29 
42 template <typename elemT>
43 class TruncateToCylindricalFOVImageProcessor : public RegisteredParsingObject<TruncateToCylindricalFOVImageProcessor<elemT>,
44  DataProcessor<DiscretisedDensity<3, elemT>>,
45  DataProcessor<DiscretisedDensity<3, elemT>>>
46 {
47 private:
50  DataProcessor<DiscretisedDensity<3, elemT>>>
51  base_type;
52 
53 public:
54  static const char* const registered_name;
55 
58 
59  void set_truncate_rim(const int truncate_rim) { this->_truncate_rim = truncate_rim; }
60 
61  int get_truncate_rim() { return this->_truncate_rim; }
62 
63  void set_strictly_less_than_radius(const bool arg) { this->_strictly_less_than_radius = arg; }
64  bool get_strictly_less_than_radius() const { return this->_strictly_less_than_radius; }
65 
66 private:
67  bool _strictly_less_than_radius;
68  int _truncate_rim;
69 
70  void set_defaults() override;
71  void initialise_keymap() override;
72 
73  Succeeded virtual_set_up(const DiscretisedDensity<3, elemT>& image) override;
74  // new
75  void virtual_apply(DiscretisedDensity<3, elemT>& out_density, const DiscretisedDensity<3, elemT>& in_density) const override;
76  void virtual_apply(DiscretisedDensity<3, elemT>& density) const override;
77 };
78 
79 END_NAMESPACE_STIR
80 
81 #endif
A class in the DataProcessor hierarchy that sets voxels to 0 outside a given radius.
Definition: TruncateToCylindricalFOVImageProcessor.h:43
Declaration of class stir::DataProcessor.
void truncate_rim(Viewgram< float > &viewgram, const int rim_truncation_sino)
sets the first and last rim_truncation_sino bins at the &#39;edges&#39; to zero
Definition: recon_array_functions.cxx:48
Base class that defines an interface for classes that do data processing.
Definition: DataProcessor.h:46
defines the stir::DiscretisedDensity class
Parent class for all leaves in a RegisteredObject hierarchy that do parsing of parameter files...
Definition: RegisteredParsingObject.h:77
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43
Declaration of class stir::RegisteredParsingObject.
This abstract class is the basis for all image representations.
Definition: FBP2DReconstruction.h:35