Shapeworks Studio  2.1
Shape analysis software suite
itkPSMAttribute.h
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 __itkPSMAttribute_h
19 #define __itkPSMAttribute_h
20 
21 #include "itkDataObject.h"
22 #include "itkPoint.h"
23 #include "itkWeakPointer.h"
24 #include "itkCommand.h"
25 #include "itkPSMEvents.h"
26 
27 namespace itk
28 {
29 
34 template< unsigned int VDimension>
35 class ITK_EXPORT PSMAttribute : public DataObject
36 {
37 public:
39  typedef PSMAttribute Self;
40  typedef DataObject Superclass;
41  typedef SmartPointer<Self> Pointer;
42  typedef SmartPointer<const Self> ConstPointer;
43  typedef WeakPointer<const Self> ConstWeakPointer;
44 
46  itkNewMacro(Self);
47 
49  itkTypeMacro(PSMAttribute, DataObject);
50 
56  {
57  DefinedCallbacksStruct() : Event(false),
58  EventWithIndex(false),
59  DomainAddEvent(false),
60  TransformSetEvent(false),
61  PrefixTransformSetEvent(false),
62  NeighborhoodSetEvent(false),
63  PositionSetEvent(false),
64  PositionAddEvent(false),
65  PositionRemoveEvent(false) {}
66  bool Event;
67  bool EventWithIndex;
68  bool DomainAddEvent;
69  bool TransformSetEvent;
70  bool PrefixTransformSetEvent;
71  bool NeighborhoodSetEvent;
72  bool PositionSetEvent;
73  bool PositionAddEvent;
74  bool PositionRemoveEvent;
75  };
76 
77  DefinedCallbacksStruct m_DefinedCallbacks;
78 
83  virtual void EventCallback(Object *, const EventObject &) {}
84  virtual void EventWithIndexCallback(Object *, const EventObject &) {}
85  virtual void DomainAddEventCallback(Object *, const EventObject &) {}
86  virtual void TransformSetEventCallback(Object *, const EventObject &) {}
87  virtual void PrefixTransformSetEventCallback(Object *, const EventObject &) {}
88  virtual void NeighborhoodSetEventCallback(Object *, const EventObject &) {}
89  virtual void PositionSetEventCallback(Object *, const EventObject &) {}
90  virtual void PositionAddEventCallback(Object *, const EventObject &) {}
91  virtual void PositionRemoveEventCallback(Object *, const EventObject &) {}
92 
93 protected:
94  PSMAttribute() {}
95  virtual ~PSMAttribute() {};
96 
97  void PrintSelf(std::ostream& os, Indent indent) const
98  { Superclass::PrintSelf(os,indent); }
99 
100 private:
101  PSMAttribute(const Self&); //purposely not implemented
102  void operator=(const Self&); //purposely not implemented
103 };
104 
105 } // end namespace itk
106 
107 #endif
virtual void EventCallback(Object *, const EventObject &)
Base class for PSMParticleSystem attribute classes.
PSMAttribute Self