20 #ifndef MIRTK_ExtrapolationMode_H 21 #define MIRTK_ExtrapolationMode_H 23 #include "mirtk/String.h" 32 Extrapolation_Default,
38 Extrapolation_ConstWithPeriodicTime,
49 case Extrapolation_Default: str =
"Default";
break;
50 case Extrapolation_None: str =
"None";
break;
51 case Extrapolation_Const: str =
"Const";
break;
52 case Extrapolation_NN: str =
"NN";
break;
53 case Extrapolation_Repeat: str =
"Repeat";
break;
54 case Extrapolation_Mirror: str =
"Mirror";
break;
55 case Extrapolation_ConstWithPeriodicTime: str =
"ConstWithPeriodicTime";
break;
56 default: str =
"Unknown";
break;
66 case Extrapolation_ConstWithPeriodicTime:
67 case Extrapolation_Const:
return Extrapolation_ConstWithPeriodicTime;
68 case Extrapolation_Repeat:
return Extrapolation_Repeat;
69 default:
return Extrapolation_None;
78 case Extrapolation_Const:
79 case Extrapolation_ConstWithPeriodicTime:
return Extrapolation_Const;
90 if (lstr ==
"default" ) m = Extrapolation_Default;
91 else if (lstr ==
"none" ) m = Extrapolation_None;
92 else if (lstr ==
"const" ) m = Extrapolation_Const;
93 else if (lstr ==
"nn" ) m = Extrapolation_NN;
94 else if (lstr ==
"repeat" || lstr ==
"tile") m = Extrapolation_Repeat;
95 else if (lstr ==
"mirror" ) m = Extrapolation_Mirror;
96 else if (lstr ==
"constwithperiodictime" ) m = Extrapolation_ConstWithPeriodicTime;
104 #endif // MIRTK_ExtrapolationMode_H ExtrapolationMode ExtrapolationWithPeriodicTime(ExtrapolationMode m)
Get corresponding extrapolation with periodic time.
ExtrapolationMode ExtrapolationWithoutPeriodicTime(ExtrapolationMode m)
Get corresponding extrapolation without periodic time.
string ToLower(const string &)
Convert string to lowercase letters.
string ToString(const EnergyMeasure &value, int w, char c, bool left)
Convert energy measure enumeration value to string.
bool FromString(const char *str, EnergyMeasure &value)
Convert energy measure string to enumeration value.
ExtrapolationMode
Image extrapolation modes.