15#ifndef __vtkMRMLCameraNode_h
16#define __vtkMRMLCameraNode_h
34 void PrintSelf(ostream& os, vtkIndent indent)
override;
48 void WriteXML(ostream& of,
int indent)
override;
83 vtkGetObjectMacro(Camera, vtkCamera);
119 inline void SetPosition(
double x,
double y,
double z);
125 void GetPosition(
double position[3]);
131 void SetFocalPoint(
double focalPoint[3]);
132 inline
void SetFocalPoint(
double x,
double y,
double z);
137 double* GetFocalPoint() VTK_SIZEHINT(3);
138 void GetFocalPoint(
double focalPoint[3]);
143 void SetViewUp(
double viewUp[3]);
144 inline
void SetViewUp(
double vx,
double vy,
double vz);
149 double* GetViewUp() VTK_SIZEHINT(3);
150 void GetViewUp(
double viewUp[3]);
154 void ProcessMRMLEvents ( vtkObject * ,
162 vtkGetObjectMacro(AppliedTransform, vtkMatrix4x4);
163 virtual
void SetAppliedTransform(vtkMatrix4x4* appliedTransform);
169 LayoutNameModifiedEvent = 30000,
170 ActiveTagModifiedEvent = LayoutNameModifiedEvent,
171 CameraInteractionEvent = 31000,
172 ResetCameraClippingEvent = 32000,
222 bool resetTranslation =
true,
223 bool resetDistance =
true,
224 vtkRenderer* renderer =
nullptr);
232 vtkGetMacro(Interacting,
int);
233 vtkBooleanMacro(Interacting,
int);
256 vtkGetMacro(InteractionFlags,
unsigned int);
267 vtkCamera* Camera{
nullptr};
280 double pos[3] = {x, y, z};
287 double pos[3] = {x, y, z};
294 double viewUp[3] = {vx, vy, vz};
MRML node to represent camera node.
static vtkMRMLCameraNode * New()
int GetParallelProjection()
Set camera ParallelProjection flag.
void SetParallelProjection(int parallelProjection)
Set camera ParallelProjection flag.
void SetCamera(vtkCamera *camera)
void RotateAround(RASAxis axis, bool clockWise)
void SetViewUp(double viewUp[3])
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file.
void operator=(const vtkMRMLCameraNode &)
vtkMRMLCopyContentMacro(vtkMRMLCameraNode)
void SetLayoutName(const char *layoutName)
vtkMRMLNode * CreateNodeInstance() override
MRMLNode methods.
void Copy(vtkMRMLNode *node) override
Copy the node's attributes to this object.
double * GetPosition() VTK_SIZEHINT(3)
void Reset(bool resetRotation, bool resetTranslation=true, bool resetDistance=true, vtkRenderer *renderer=nullptr)
void SetPosition(double position[3])
vtkMatrix4x4 * AppliedTransform
void ResetClippingRange()
Reset the clipping range just based on its position and focal point.
void RotateAround(RASAxis axis, double angle=15.)
15 degrees by default
const char * GetActiveTag()
void SetParallelScale(double scale)
Set camera Parallel Scale.
void SetAndObserveCamera(vtkCamera *camera)
void SetViewAngle(double viewAngle)
void PrintSelf(ostream &os, vtkIndent indent) override
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
~vtkMRMLCameraNode() override
vtkMRMLCameraNode(const vtkMRMLCameraNode &)
void SetFocalPoint(double focalPoint[3])
std::string InternalActiveTag
void RotateTo(Direction position)
double GetParallelScale()
Set camera Parallel Scale.
virtual void SetActiveTag(const char *)
unsigned int InteractionFlags
void SetInteractionFlags(unsigned int)
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
void TranslateAlong(ScreenAxis axis, bool positive)
Abstract Superclass for all specific types of MRML nodes.
virtual void Reset(vtkMRMLNode *defaultNode)
Reset node attributes to the initial state as defined in the constructor or the passed default node.