1 /*============================================================================
2   MetaIO
3   Copyright 2000-2010 Insight Software Consortium
4 
5   Distributed under the OSI-approved BSD License (the "License");
6   see accompanying file Copyright.txt for details.
7 
8   This software is distributed WITHOUT ANY WARRANTY; without even the
9   implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10   See the License for more information.
11 ============================================================================*/
12 #include "metaTypes.h"
13 
14 #ifndef ITKMetaIO_METAGAUSSIAN_H
15 #  define ITKMetaIO_METAGAUSSIAN_H
16 
17 #  include "metaUtils.h"
18 #  include "metaObject.h"
19 
20 #  include <list>
21 
22 
23 /*!    MetaGaussian (.h and .cpp)
24  *
25  * Description:
26  *    Reads and Writes MetaGaussianFiles.
27  *
28  * \author Mark Foskey
29  *
30  * \date February 12, 2004
31  *
32  * Depends on:
33  *    MetaUtils.h
34  *    MetaObject.h
35  */
36 
37 #  if (METAIO_USE_NAMESPACE)
38 namespace METAIO_NAMESPACE
39 {
40 #  endif
41 
42 class METAIO_EXPORT MetaGaussian : public MetaObject
43 {
44 
45   // PUBLIC
46 public:
47   // Constructors & Destructor
48   MetaGaussian();
49 
50   explicit MetaGaussian(const char * _headerName);
51 
52   explicit MetaGaussian(const MetaGaussian * _gaussian);
53 
54   explicit MetaGaussian(unsigned int dim);
55 
56   ~MetaGaussian() override;
57 
58   void
59   PrintInfo() const override;
60 
61   void
62   CopyInfo(const MetaObject * _object) override;
63 
64   void
65   Clear() override;
66 
67   /** Set/Get the maximum value. */
68   void
Maximum(float val)69   Maximum(float val)
70   {
71     m_Maximum = val;
72   }
73   float
Maximum()74   Maximum() const
75   {
76     return m_Maximum;
77   }
78 
79   /** Set/Get the radius value. */
80   void
Radius(float val)81   Radius(float val)
82   {
83     m_Radius = val;
84   }
85   float
Radius()86   Radius() const
87   {
88     return m_Radius;
89   }
90 
91   /** Set/Get the sigma value. */
92   void
Sigma(float val)93   Sigma(float val)
94   {
95     m_Sigma = val;
96   }
97   float
Sigma()98   Sigma() const
99   {
100     return m_Sigma;
101   }
102 
103   // PROTECTED
104 protected:
105 
106   /** Set up the fields to read a MetaGaussian file. */
107   void
108   M_SetupReadFields() override;
109 
110   /** Set up the fields to write a MetaGaussian file. */
111   void
112   M_SetupWriteFields() override;
113 
114   /** Read the MetaGaussian file properties. */
115   bool
116   M_Read() override;
117 
118   /** The maximum value of the MetaGaussian object. */
119   float m_Maximum{};
120 
121   /** The radius of the MetaGaussian object. */
122   float m_Radius{};
123 
124   /** The standard deviation of the MetaGaussian object. */
125   float m_Sigma{};
126 };
127 
128 
129 #  if (METAIO_USE_NAMESPACE)
130 };
131 #  endif
132 
133 
134 #endif
135