NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkFileIOUtils.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 niftkFileIOUtils_h
16 #define niftkFileIOUtils_h
17 
18 #include "niftkCoreExports.h"
19 
20 #include <vtkMatrix4x4.h>
21 #include <vtkSmartPointer.h>
22 
23 #include <mitkImage.h>
24 #include <mitkPointSet.h>
25 #include <mitkVector.h>
26 
27 
28 namespace niftk
29 {
30 
33 bool LoadDoublesFromFile(const std::string& fileName, std::vector<double>& output);
34 
36 NIFTKCORE_EXPORT bool Load2DPointFromFile(const std::string& fileName, mitk::Point2D& point);
37 
39 NIFTKCORE_EXPORT bool Load3DPointFromFile(const std::string& fileName, mitk::Point3D& point);
40 
44 NIFTKCORE_EXPORT vtkSmartPointer<vtkMatrix4x4> LoadVtkMatrix4x4FromFile(const std::string &fileName);
45 
50 NIFTKCORE_EXPORT bool SaveVtkMatrix4x4ToFile (const std::string& fileName, const vtkMatrix4x4& matrix);
51 
53 NIFTKCORE_EXPORT std::vector<mitk::PointSet::Pointer> LoadPointSetsFromDirectory(const std::string fullDirectoryName);
54 
56 NIFTKCORE_EXPORT void LoadTimeStampData(const std::string& fileName, std::set<unsigned long long>& outputTimeStamps);
57 
58 }
59 
60 #endif
bool Load3DPointFromFile(const std::string &fileName, mitk::Point3D &point)
Loads a 3D point from file, returning true if successful and false otherwise.
Definition: niftkFileIOUtils.cxx:89
std::vector< mitk::PointSet::Pointer > LoadPointSetsFromDirectory(const std::string fullDirectoryName)
Loads all point sets from directory.
Definition: niftkFileIOUtils.cxx:135
bool Load2DPointFromFile(const std::string &fileName, mitk::Point2D &point)
Loads a 2D point from file, returning true if successful and false otherwise.
Definition: niftkFileIOUtils.cxx:63
GLuint GLenum matrix
Definition: glew.h:12775
void LoadTimeStampData(const std::string &fileName, std::set< unsigned long long > &outputTimeStamps)
Loads a list of timestamps from a file.
Definition: niftkFileIOUtils.cxx:166
bool LoadDoublesFromFile(const std::string &fileName, std::vector< double > &output)
Definition: niftkFileIOUtils.cxx:28
vtkSmartPointer< vtkMatrix4x4 > LoadVtkMatrix4x4FromFile(const std::string &fileName)
Load a plain text file of 4 rows of 4 space separated numbers into a vtkMatrix4x4.
Definition: niftkFileIOUtils.cxx:116
Definition: niftkExceptionObject.h:21
GLsizei const GLcharARB ** string
Definition: glew.h:5194
bool SaveVtkMatrix4x4ToFile(const std::string &fileName, const vtkMatrix4x4 &matrix)
Save the matrix to a plain text file of 4 rows of 4 space separated numbers.
Definition: niftkFileIOUtils.cxx:123