ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkSpatialObjectProperty.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkSpatialObjectProperty_h
19 #define itkSpatialObjectProperty_h
20 
21 #include <string>
22 
23 #include "itkRGBAPixel.h"
24 #include "itkLightObject.h"
25 #include "itkObjectFactory.h"
26 
27 namespace itk
28 {
34 template< typename TComponentType = float >
35 class ITK_TEMPLATE_EXPORT SpatialObjectProperty:
36  public LightObject
37 {
38 public:
39 
43  typedef std::string StringType;
44 
47 
48  itkNewMacro(Self);
49  itkTypeMacro(SpatialObjectProperty, LightObject);
50 
51  const PixelType & GetColor() const;
52 
53  void SetColor(const PixelType & color);
54 
55  void SetColor(TComponentType r, TComponentType g, TComponentType b);
56 
57  void SetRed(TComponentType r);
58 
59  TComponentType GetRed() const;
60 
61  void SetGreen(TComponentType g);
62 
63  TComponentType GetGreen() const;
64 
65  void SetBlue(TComponentType b);
66 
67  TComponentType GetBlue() const;
68 
69  void SetAlpha(TComponentType a);
70 
71  TComponentType GetAlpha() const;
72 
74  virtual ~SpatialObjectProperty() ITK_OVERRIDE;
75 
76  void SetName(const char *name);
77 
78  StringType GetName() const;
79 
80  ModifiedTimeType GetMTime(void){ return m_MTime; }
81 
82 protected:
83 
84  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
85 
86  void Modified(void){ m_MTime++; }
87 
88 private:
89  ITK_DISALLOW_COPY_AND_ASSIGN(SpatialObjectProperty);
90 
94 };
95 }
96 
97 #ifndef ITK_MANUAL_INSTANTIATION
98 #include "itkSpatialObjectProperty.hxx"
99 #endif
100 
101 #endif // __SpatialObjectProperty_h
Light weight base class for most itk classes.
SpatialObjectProperty< TComponentType > Self
unsigned long ModifiedTimeType
Definition: itkIntTypes.h:164
RGBAPixel< TComponentType > PixelType
SmartPointer< const Self > ConstPointer
Control indentation during Print() invocation.
Definition: itkIndent.h:49