33 #ifndef __EMSCRIPTEN__ 35 #include "vector_functions.h" 57 template <
typename T,
int nDims>
63 ImageMHD(std::string full_path_file);
68 void set_objectType(std::string objectType)
70 objectType_ = objectType;
73 void set_binaryData(
bool binaryData)
75 binaryData_ = binaryData;
77 void set_binaryDataByteOrderMSB(
bool binaryDataByteOrderMSB)
79 binaryDataByteOrderMSB_ = binaryDataByteOrderMSB;
81 void set_compressedData(
bool compressedData)
83 compressedData_ = compressedData;
85 void set_transformMatrix(Mat3d transformMatrix)
87 transformMatrix_ = transformMatrix;
89 void set_offset(Vec3d offset)
93 void set_centerOfRotation(Vec3d centerOfRotation)
95 centerOfRotation_ = centerOfRotation;
97 void set_elementSpacing(Vec3d elementSpacing)
99 elementSpacing_ = elementSpacing;
101 void set_dimSize(Vec3d dimSize)
105 void set_anatomicalOrientation(std::string anatomicalOrientation)
107 anatomicalOrientation_ = anatomicalOrientation;
109 void set_elementType(std::string elementType)
111 elementType_ = elementType;
113 void set_elementDataFile(std::string elementDataFile)
115 elementDataFile_ = elementDataFile;
118 T* get_data() {
return data_; };
120 int get_size() {
return size_; }
122 Real get_min_value() {
return min_value_; };
123 Real get_max_value() {
return max_value_; };
125 Vec3d findClosestPoint(
const Vec3d& input_pnt);
127 Real findValueAtPoint(
const Vec3d& input_pnt);
128 Vec3d findNormalAtPoint(
const Vec3d & input_pnt);
130 void write(std::string filename, Output_Mode=BINARY);
133 std::string objectType_;
136 bool binaryDataByteOrderMSB_;
137 bool compressedData_;
138 Mat3d transformMatrix_;
140 Vec3d centerOfRotation_;
141 Vec3d elementSpacing_;
147 std::string anatomicalOrientation_;
148 Image_Data_Type elementType_;
149 std::string elementDataFile_;
154 std::vector<int> findNeighbors(
const Vec3d& input_pnt,
Vec3i& this_cell);
155 Vec3d computeGradientAtCell(
int i);
156 Vec3d computeNormalAtCell(
int i);
157 T getValueAtCell(
int i);
158 Vec3d convertToPhysicalSpace(Vec3d p);
159 void split(
const std::string &s,
char delim, std::vector<std::string> &elems);
166 #endif //__EMSCRIPTEN__ Definition: image_mhd.h:58
Set up of basic data structure.
Definition: solid_body_supplementary.cpp:9