Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkDataCollectionUtilities.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef mitkDataCollectionUtilities_h
18 #define mitkDataCollectionUtilities_h
19 
20 #include <MitkDataCollectionExports.h>
21 
22 #include <mitkDataCollection.h>
23 #include <Eigen/Dense>
24 
25 namespace mitk
26 {
27  class MITKDATACOLLECTION_EXPORT DCUtilities
28  {
29  public:
30  static int VoxelInMask(mitk::DataCollection::Pointer dc, std::string mask);
31 
32  static Eigen::MatrixXd DC3dDToMatrixXd(mitk::DataCollection::Pointer dc, std::string names, std::string mask);
33  static Eigen::MatrixXd DC3dDToMatrixXd(mitk::DataCollection::Pointer dc, const std::vector<std::string> &names, std::string mask);
34  static Eigen::MatrixXi DC3dDToMatrixXi(mitk::DataCollection::Pointer dc, std::string name, std::string mask);
35  static Eigen::MatrixXi DC3dDToMatrixXi(mitk::DataCollection::Pointer dc, const std::vector<std::string> &names, std::string mask);
36 
37  static void MatrixToDC3d(const Eigen::MatrixXd &matrix, mitk::DataCollection::Pointer dc, const std::vector<std::string> &names, std::string mask);
38  static void MatrixToDC3d(const Eigen::MatrixXi &matrix, mitk::DataCollection::Pointer dc, const std::vector<std::string> &names, std::string mask);
39  static void MatrixToDC3d(const Eigen::MatrixXd &matrix, mitk::DataCollection::Pointer dc, const std::string &names, std::string mask);
40  static void MatrixToDC3d(const Eigen::MatrixXi &matrix, mitk::DataCollection::Pointer dc, const std::string &names, std::string mask);
41 
42  static void EnsureUCharImageInDC(mitk::DataCollection::Pointer dc, std::string name, std::string origin);
43  static void EnsureDoubleImageInDC(mitk::DataCollection::Pointer dc, std::string name, std::string origin);
44  };
45 }
46 
47 #endif
DataCollection - Class to facilitate loading/accessing structured data.