59 std::vector<size_t> *matchedRegExIdxVec=
nullptr);
64 const std::string ®Ex);
69 const std::string ®Ex,
107 const bool useRegularExpression,
108 const std::string &firstExpression,
109 const std::string &lineEnd,
111 std::string *errorInfos=
nullptr);
140 const std::vector<SubImage> &frameSubImgs,
141 MLint zTranslate = 0,
143 bool orValue =
false);
179 double &avrOfSumOfSquaredDiffs);
185template <
typename DT1,
typename DT2>
190 double avrOfSumOfSquaredDifferences = -1.;
193 avrOfSumOfSquaredDifferences = 0.;
195 for (p.
u = box.
v1.
u; p.
u <= box.
v2.
u; ++p.
u){
196 for (p.
t = box.
v1.
t; p.
t <= box.
v2.
t; ++p.
t){
197 for (p.
c = box.
v1.
c; p.
c <= box.
v2.
c; ++p.
c){
198 for (p.
z = box.
v1.
z; p.
z <= box.
v2.
z; ++p.
z){
199 for (p.
y = box.
v1.
y; p.
y <= box.
v2.
y; ++p.
y){
204 for (; p.
x <= box.
v2.
x; ++p.
x, ++v1, ++v2){
206 const double diff =
static_cast<double>(*v1) -
static_cast<double>(*v2);
207 avrOfSumOfSquaredDifferences += diff*diff;
215 avrOfSumOfSquaredDifferences /=
static_cast<double>(box.
getNumVoxels());
217 return avrOfSumOfSquaredDifferences;
const SubImageBox & getBox() const
Returns the box describing the origin/extent of the subimage.
static TSubImageBox< intT > intersect(const TSubImageBox< intT > &box1, const TSubImageBox< intT > &box2)
intT getNumVoxels() const
const DATATYPE * getImagePointer(const ImageVector &position) const
ComponentType c
Color component of the vector.
ComponentType t
Time component of the vector.
ComponentType u
Unit/Modality/User component of the vector.
ComponentType z
Z component of the vector.
ComponentType x
X component of the vector.
ComponentType y
Y component of the vector.
MLint32 MLErrorCode
Type of an ML Error code.
Tool function(s) to determine translation information from one directory to another.
TSubImageBox< MLint > SubImageBox
Defines the standard SubImageBox type used in the ML. Its size varies with the size of the MLint type...
TImageVector< MLint > ImageVector
Defines the standard ImageVector type that is used by the ML for indexing and coordinates.