Slicer  5.1
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkSlicerSubjectHierarchyModuleLogic.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
6  Queen's University, Kingston, ON, Canada. All Rights Reserved.
7 
8  See COPYRIGHT.txt
9  or http://www.slicer.org/copyright/copyright.txt for details.
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  This file was originally developed by Csaba Pinter, PerkLab, Queen's University
18  and was supported through the Applied Cancer Research Unit program of Cancer Care
19  Ontario with funds provided by the Ontario Ministry of Health and Long-Term Care
20 
21 ==============================================================================*/
22 
23 // .NAME vtkSlicerSubjectHierarchyModuleLogic - slicer logic class for volumes manipulation
24 // .SECTION Description
25 // This class manages the logic associated with reading, saving,
26 // and changing propertied of the volumes
27 
28 
29 #ifndef __vtkSlicerSubjectHierarchyModuleLogic_h
30 #define __vtkSlicerSubjectHierarchyModuleLogic_h
31 
32 // Slicer includes
33 #include "vtkSlicerModuleLogic.h"
34 
35 #include "vtkSlicerSubjectHierarchyModuleLogicExport.h"
36 
39 
41 class VTK_SLICER_SUBJECTHIERARCHY_LOGIC_EXPORT vtkSlicerSubjectHierarchyModuleLogic :
43 {
44 public:
46  static const char* CLONED_NODE_NAME_POSTFIX;
47 
48 public:
51  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
53 public:
56  static vtkIdType InsertDicomSeriesInHierarchy(
57  vtkMRMLSubjectHierarchyNode* shNode, const char* subjectId, const char* studyInstanceUID, const char* seriesInstanceUID );
58 
65  static vtkIdType AreItemsInSameBranch(
66  vtkMRMLSubjectHierarchyNode* shNode, vtkIdType item1, vtkIdType item2, std::string lowestCommonLevel );
72  static vtkIdType AreNodesInSameBranch(
73  vtkMRMLNode* node1, vtkMRMLNode* node2, std::string lowestCommonLevel );
74 
76  static bool IsPatientTag(std::string tagName);
77 
79  static bool IsStudyTag(std::string tagName);
80 
88  static void TransformBranch(
89  vtkMRMLSubjectHierarchyNode* shNode, vtkIdType itemID, vtkMRMLTransformNode* transformNode, bool hardenExistingTransforms=true);
90 
94  static void HardenTransformOnBranch(vtkMRMLSubjectHierarchyNode* shNode, vtkIdType itemID);
95 
100  static vtkIdType CloneSubjectHierarchyItem(
101  vtkMRMLSubjectHierarchyNode* shNode, vtkIdType itemID, const char* name=nullptr );
102 
104  vtkMRMLSubjectHierarchyNode* GetSubjectHierarchyNode();
105 
106 protected:
108  void SetMRMLSceneInternal(vtkMRMLScene* newScene) override;
109 
111  void UpdateFromMRMLScene() override;
112 
113 protected:
116 
117 private:
119  void operator=(const vtkSlicerSubjectHierarchyModuleLogic&) = delete;
120 };
121 
122 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
static vtkSlicerModuleLogic * New()
The Usual vtk class functions.
MRML node for representing a transformation between this node space and a parent node space...
MRML node to represent a complete subject hierarchy tree.
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:57
virtual void SetMRMLSceneInternal(vtkMRMLScene *newScene)
static const char * CLONED_NODE_NAME_POSTFIX
Postfix added to cloned node name by default.
virtual void UpdateFromMRMLScene()
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167