IGSTK
igstkToolProjectionObjectRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Image Guided Surgery Software Toolkit
4  Module: $RCSfile: igstkToolProjectionObjectRepresentation.h,v $
5  Language: C++
6  Date: $Date: 2009-06-15 21:05:54 $
7  Version: $Revision: 1.2 $
8 
9  Copyright (c) ISC Insight Software Consortium. All rights reserved.
10  See IGSTKCopyright.txt or http://www.igstk.org/copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 
18 #ifndef __igstkToolProjectionObjectRepresentation_h
19 #define __igstkToolProjectionObjectRepresentation_h
20 
21 #include "igstkMacros.h"
25 #include "igstkStateMachine.h"
26 
27 class vtkLineSource;
28 class vtkProperty;
29 
30 namespace igstk
31 {
32 
46 {
47 
48 public:
49 
53 
54 public:
55 
58  typedef ReslicerPlaneSpatialObject ReslicerPlaneType;
59 
60  typedef ReslicerPlaneType::Pointer ReslicerPlanePointerType;
61 
62  typedef ReslicerPlaneType::VectorType VectorType;
63 
65 
67  void RequestSetReslicePlaneSpatialObject( const ReslicerPlaneType *
68  planeSpatialObject);
69 
71  Pointer Copy() const;
72 
74  void RequestSetToolProjectionObject( const ToolProjectionSpatialObjectType *
75  toolProjectionObject );
76 
77  virtual void SetVisibility ( bool visible);
78 
80  void SetLineWidth(double LineWidth);
81  igstkGetMacro( LineWidth, double );
82 
83 protected:
84 
86  virtual ~ToolProjectionObjectRepresentation( void );
87 
89  virtual void PrintSelf( std::ostream& os, itk::Indent indent ) const;
90 
92  void CreateActors();
93 
96  virtual bool VerifyTimeStamp() const;
97 
98 private:
99 
100  ToolProjectionObjectRepresentation(const Self&); //purposely not implemented
101  void operator=(const Self&); //purposely not implemented
102 
103 
105  ToolProjectionSpatialObjectType::ConstPointer m_ToolProjectionSpatialObject;
106 
108  virtual void UpdateRepresentationProcessing();
109 
112  void SetToolProjectionObjectProcessing();
113 
116  void NoProcessing();
117 
119  void SetReslicePlaneSpatialObjectProcessing();
120 
122  igstkObserverMacro( ImageBounds, igstk::ImageBoundsEvent,
123  igstk::EventHelperType::ImageBoundsType );
124 
127  igstkObserverMacro( ReslicerPlaneNormal,
128  ReslicerPlaneType::ReslicerPlaneNormalEvent,
129  ReslicerPlaneType::VectorType);
130 
131  ReslicerPlaneNormalObserver::Pointer m_ReslicerPlaneNormalObserver;
132 
133 private:
134 
136  ReslicerPlanePointerType m_ReslicePlaneSpatialObjectToBeSet;
137  ReslicerPlanePointerType m_ReslicePlaneSpatialObject;
138 
139  vtkLineSource* m_LineSource;
140  vtkProperty* m_LineProperty;
141 
142  double m_LineWidth;
143 
145  igstkDeclareInputMacro( ValidToolProjectionObject );
146  igstkDeclareInputMacro( NullToolProjectionObject );
147  igstkDeclareInputMacro( ValidReslicePlaneSpatialObject );
148  igstkDeclareInputMacro( InValidReslicePlaneSpatialObject );
149 
151  igstkDeclareStateMacro( NullToolProjectionObject );
152  igstkDeclareStateMacro( ValidToolProjectionObject );
153  igstkDeclareStateMacro( ValidReslicePlaneSpatialObject );
154 
155  ToolProjectionSpatialObjectType::ConstPointer m_ToolProjectionObjectToAdd;
156 
157 };
158 
159 } // end namespace igstk
160 
161 #endif // __igstkToolProjectionObjectRepresentation_h