NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkConversionUtils.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 niftkConversionUtils_h
16 #define niftkConversionUtils_h
17 
18 #include <NifTKConfigure.h>
20 
21 #include <string>
22 
23 #define NIFTK_PI 3.1415926535897932384626433832795
24 
25 namespace niftk
26 {
27 
29 
31 
33 
35 
37 
39 
41 
43 
45 
47 
49 
50 NIFTKCOMMON_WINEXPORT int Round(double d);
51 
52 NIFTKCOMMON_WINEXPORT double Round(double x, int decimalPlaces);
53 
54 NIFTKCOMMON_WINEXPORT double fixRangeTo1(double i);
55 
58 
61 
64 
67  double millimetreCoordinateOfFirstVoxel,
68  int numberOfVoxelsInThatAxis,
69  double voxelSpacingInThatAxis);
70 
73  double millimetreCoordinateOfMiddleVoxel,
74  int numberOfVoxelsInThatAxis,
75  double voxelSpacingInThatAxis);
76 
77 } // end namespace
78 
79 #endif // niftkConversionUtils_h
int ConvertToInt(const std::string &x)
Definition: niftkConversionUtils.cxx:82
double CalculateStdDevFromFWHM(double fwhm)
Definition: niftkConversionUtils.cxx:119
double fixRangeTo1(double d)
Definition: niftkConversionUtils.cxx:152
double ConvertMiddleOfImageCoordinateToFirstVoxelCoordinate(double millimetreCoordinateOfMiddleVoxel, int numberOfVoxelsInThatAxis, double voxelSpacingInThatAxis)
Definition: niftkConversionUtils.cxx:140
double ConvertFirstVoxelCoordinateToMiddleOfImageCoordinate(double millimetreCoordinateOfFirstVoxel, int numberOfVoxelsInThatAxis, double voxelSpacingInThatAxis)
Definition: niftkConversionUtils.cxx:128
double CalculateVarianceFromFWHM(double fwhm)
Definition: niftkConversionUtils.cxx:110
double ConvertToDouble(const std::string &x)
Definition: niftkConversionUtils.cxx:89
int Round(double d)
Definition: niftkConversionUtils.cxx:160
#define NIFTKCOMMON_WINEXPORT
Definition: niftkCommonWin32ExportHeader.h:28
bool ConvertToBool(const std::string &x)
Definition: niftkConversionUtils.cxx:96
std::string GetLastNCharacters(std::string s, int n)
Definition: niftkConversionUtils.cxx:175
std::string ConvertToString(int x)
Definition: niftkConversionUtils.cxx:26
GLint GLint GLint GLint GLint x
Definition: glew.h:1236
GLclampd n
Definition: glew.h:6789
GLdouble s
Definition: glew.h:1374
Definition: niftkExceptionObject.h:21
GLsizei const GLcharARB ** string
Definition: glew.h:5194