NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkDataStorageUtils.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef niftkDataStorageUtils_h
16 #define niftkDataStorageUtils_h
17 
18 #include "niftkCoreExports.h"
19 
20 #include <mitkDataNode.h>
21 #include <mitkDataStorage.h>
22 #include <mitkTimeGeometry.h>
23 
26 namespace niftk
27 {
28 
29 NIFTKCORE_EXPORT bool IsNodeAGreyScaleImage(const mitk::DataNode::Pointer node);
30 
31 NIFTKCORE_EXPORT bool IsNodeABinaryImage(const mitk::DataNode::Pointer node);
32 
33 NIFTKCORE_EXPORT bool IsNodeAHelperObject(const mitk::DataNode* node);
34 
35 NIFTKCORE_EXPORT mitk::DataNode::Pointer FindFirstParent(const mitk::DataStorage* storage, const mitk::DataNode::Pointer node);
36 
37 NIFTKCORE_EXPORT mitk::DataNode::Pointer FindParentGreyScaleImage(const mitk::DataStorage* storage, const mitk::DataNode::Pointer node);
38 
39 NIFTKCORE_EXPORT mitk::DataNode::Pointer FindFirstParentImage(const mitk::DataStorage* storage, const mitk::DataNode::Pointer node, bool lookForBinary );
40 
41 NIFTKCORE_EXPORT mitk::DataNode::Pointer FindNthGreyScaleImage(const std::vector<mitk::DataNode*> &nodes, int n );
42 
43 NIFTKCORE_EXPORT mitk::DataNode::Pointer FindNthBinaryImage(const std::vector<mitk::DataNode*> &nodes, int n );
44 
45 NIFTKCORE_EXPORT mitk::DataNode::Pointer FindFirstGreyScaleImage(const std::vector<mitk::DataNode*> &nodes );
46 
47 NIFTKCORE_EXPORT mitk::DataNode::Pointer FindFirstBinaryImage(const std::vector<mitk::DataNode*> &nodes );
48 
49 NIFTKCORE_EXPORT mitk::DataNode::Pointer FindNthImage(const std::vector<mitk::DataNode*> &nodes, int n, bool lookForBinary );
50 
51 NIFTKCORE_EXPORT mitk::DataStorage::SetOfObjects::Pointer FindDerivedImages(const mitk::DataStorage* storage, const mitk::DataNode::Pointer node, bool lookForBinary );
52 
53 NIFTKCORE_EXPORT mitk::DataStorage::SetOfObjects::Pointer FindDerivedVisibleNonHelperChildren(const mitk::DataStorage* storage, const mitk::DataNode::Pointer node);
54 
73 NIFTKCORE_EXPORT mitk::TimeGeometry::Pointer GetPreferredGeometry(const mitk::DataStorage* dataStorage, const std::vector<mitk::DataNode*>& nodes, const int& nodeIndex=-1);
74 
78 NIFTKCORE_EXPORT void LoadMatrixOrCreateDefault(const std::string& fileName, const std::string& nodeName, const bool& helperObject, mitk::DataStorage* dataStorage);
79 
84 NIFTKCORE_EXPORT void GetCurrentTransformFromNode ( const mitk::DataNode::Pointer& node, vtkMatrix4x4& outputMatrix );
85 
90 NIFTKCORE_EXPORT void ComposeTransformWithNode(const vtkMatrix4x4& transform, mitk::DataNode::Pointer& node);
91 
96 NIFTKCORE_EXPORT void ApplyTransformToNode(const vtkMatrix4x4& transform, mitk::DataNode::Pointer& node);
97 
98 }
99 
100 #endif
mitk::DataNode::Pointer FindNthBinaryImage(const std::vector< mitk::DataNode * > &nodes, int n)
Definition: niftkDataStorageUtils.cxx:219
mitk::DataNode::Pointer FindNthGreyScaleImage(const std::vector< mitk::DataNode * > &nodes, int n)
Definition: niftkDataStorageUtils.cxx:212
mitk::DataNode::Pointer FindNthImage(const std::vector< mitk::DataNode * > &nodes, int n, bool lookForBinary)
Definition: niftkDataStorageUtils.cxx:181
bool IsNodeAHelperObject(const mitk::DataNode *node)
Definition: niftkDataStorageUtils.cxx:115
void ApplyTransformToNode(const vtkMatrix4x4 &transform, mitk::DataNode::Pointer &node)
Applies (sets, i.e. copies) the given transform to the given node.
Definition: niftkDataStorageUtils.cxx:461
bool IsNodeABinaryImage(const mitk::DataNode::Pointer node)
Definition: niftkDataStorageUtils.cxx:157
bool IsNodeAGreyScaleImage(const mitk::DataNode::Pointer node)
Definition: niftkDataStorageUtils.cxx:133
GLuint GLenum GLenum transform
Definition: glew.h:12775
void ComposeTransformWithNode(const vtkMatrix4x4 &transform, mitk::DataNode::Pointer &node)
Composes (pre-multiplies) the given transform with the given node.
Definition: niftkDataStorageUtils.cxx:443
mitk::DataStorage::SetOfObjects::Pointer FindDerivedVisibleNonHelperChildren(const mitk::DataStorage *storage, const mitk::DataNode::Pointer node)
Definition: niftkDataStorageUtils.cxx:60
void GetCurrentTransformFromNode(const mitk::DataNode::Pointer &node, vtkMatrix4x4 &outputMatrix)
Retrieves the current tranform from the mitk::Geometry object of an mitk::DataNode.
Definition: niftkDataStorageUtils.cxx:414
mitk::DataStorage::SetOfObjects::Pointer FindDerivedImages(const mitk::DataStorage *storage, const mitk::DataNode::Pointer node, bool lookForBinary)
Definition: niftkDataStorageUtils.cxx:87
mitk::DataNode::Pointer FindFirstParent(const mitk::DataStorage *storage, const mitk::DataNode::Pointer node)
Definition: niftkDataStorageUtils.cxx:240
GLclampd n
Definition: glew.h:6789
mitk::DataNode::Pointer FindFirstParentImage(const mitk::DataStorage *storage, const mitk::DataNode::Pointer node, bool lookForBinary)
Definition: niftkDataStorageUtils.cxx:35
mitk::DataNode::Pointer FindParentGreyScaleImage(const mitk::DataStorage *storage, const mitk::DataNode::Pointer node)
Definition: niftkDataStorageUtils.cxx:254
mitk::DataNode::Pointer FindFirstGreyScaleImage(const std::vector< mitk::DataNode * > &nodes)
Definition: niftkDataStorageUtils.cxx:226
mitk::DataNode::Pointer FindFirstBinaryImage(const std::vector< mitk::DataNode * > &nodes)
Definition: niftkDataStorageUtils.cxx:233
Definition: niftkExceptionObject.h:21
GLsizei const GLcharARB ** string
Definition: glew.h:5194
mitk::TimeGeometry::Pointer GetPreferredGeometry(const mitk::DataStorage *dataStorage, const std::vector< mitk::DataNode * > &nodes, const int &nodeIndex)
GetPreferedGeometry will return the geometry to use by picking one from the list of nodes...
Definition: niftkDataStorageUtils.cxx:284
void LoadMatrixOrCreateDefault(const std::string &fileName, const std::string &nodeName, const bool &helperObject, mitk::DataStorage *dataStorage)
Loads a 4x4 matrix from a plain textfile, and puts in data storage with the given nodeName...
Definition: niftkDataStorageUtils.cxx:367