Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
vtkSlicerReformatLogic.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Program: 3D Slicer
4
5 Copyright (c) Kitware Inc.
6
7 See COPYRIGHT.txt
8 or http://www.slicer.org/copyright/copyright.txt for details.
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16 This file was originally developed by Michael Jeulin-Lagarrigue, Kitware Inc.
17 and was partially funded by NIH grant 3P41RR013218-12S1
18
19==============================================================================*/
20
21// .NAME vtkSlicerReformatLogic - slicer logic class for volumes manipulation
22// .SECTION Description
23// This class manages the logic associated with reading, saving,
24// and changing propertied of the volumes
25
26
27#ifndef __vtkSlicerReformatLogic_h
28#define __vtkSlicerReformatLogic_h
29
30// Slicer includes
32
33// MRML includes
34
35// STD includes
36#include <cstdlib>
37
38#include "vtkSlicerReformatModuleLogicExport.h"
39
40
41class VTK_SLICER_REFORMAT_MODULE_LOGIC_EXPORT
43{
44public:
48 void PrintSelf(ostream& os, vtkIndent indent) override;
49
51 static void SetSliceOrigin(vtkMRMLSliceNode* node, double x, double y, double z);
52 static void SetSliceOrigin(vtkMRMLSliceNode* node, double position[3]);
53
55 static void SetSliceNormal(vtkMRMLSliceNode* node, double x, double y, double z);
56 static void SetSliceNormal(vtkMRMLSliceNode* node, double normal[3]);
57
59 static void GetVolumeBounds(vtkMRMLSliceNode* node, double bounds[6]);
60
62 static void GetCenterFromBounds(double bounds[6], double center[3]);
63
67 static void RotateSlice(vtkMRMLSliceNode* node, int axisIndex, double rotationAngleDeg);
68
69protected:
72
73private:
74
76 void operator=(const vtkSlicerReformatLogic&) = delete;
77};
78
79#endif
MRML node for storing a slice through RAS space.
static void RotateSlice(vtkMRMLSliceNode *node, int axisIndex, double rotationAngleDeg)
static void SetSliceNormal(vtkMRMLSliceNode *node, double x, double y, double z)
Set the normal to the plane of the slice node.
static vtkSlicerReformatLogic * New()
static void SetSliceOrigin(vtkMRMLSliceNode *node, double x, double y, double z)
Set the world coordinate origin position.
static void SetSliceOrigin(vtkMRMLSliceNode *node, double position[3])
static void SetSliceNormal(vtkMRMLSliceNode *node, double normal[3])
static void GetVolumeBounds(vtkMRMLSliceNode *node, double bounds[6])
Compute and return the volume bounding box.
void PrintSelf(ostream &os, vtkIndent indent) override
vtkSlicerReformatLogic Self
~vtkSlicerReformatLogic() override
static void GetCenterFromBounds(double bounds[6], double center[3])
Compute the center from a bounds.