/*=========================================================================
Program: vv http://www.creatis.insa-lyon.fr/rio/vv
/*=========================================================================
Program: vv http://www.creatis.insa-lyon.fr/rio/vv
- University of LYON http://www.universite-lyon.fr/
- Léon Bérard cancer center http://www.centreleonberard.fr
- CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
- University of LYON http://www.universite-lyon.fr/
- Léon Bérard cancer center http://www.centreleonberard.fr
- CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
//--------------------------------------------------------------------
namespace clitk {
typedef unsigned char uchar;
typedef unsigned short ushort;
typedef unsigned int uint;
//--------------------------------------------------------------------
namespace clitk {
typedef unsigned char uchar;
typedef unsigned short ushort;
typedef unsigned int uint;
//--------------------------------------------------------------------
// when everything goes wrong
#define WHEREAMI "[ " << __FILE__ << " ] line " << __LINE__
//--------------------------------------------------------------------
// when everything goes wrong
#define WHEREAMI "[ " << __FILE__ << " ] line " << __LINE__
//--------------------------------------------------------------------
// GGO with modified struct name
#define GGO(ggo_filename, args_info) \
//--------------------------------------------------------------------
// GGO with modified struct name
#define GGO(ggo_filename, args_info) \
cmdline_parser_##ggo_filename##2(argc, argv, &args_info, 1, 1, 0); \
if (args_info.config_given) \
cmdline_parser_##ggo_filename##_configfile (args_info.config_arg, &args_info, 0, 0, 1); \
cmdline_parser_##ggo_filename##2(argc, argv, &args_info, 1, 1, 0); \
if (args_info.config_given) \
cmdline_parser_##ggo_filename##_configfile (args_info.config_arg, &args_info, 0, 0, 1); \
//--------------------------------------------------------------------
// Return filename extension
std::string GetExtension(const std::string& filename);
//--------------------------------------------------------------------
// Return filename extension
std::string GetExtension(const std::string& filename);
//--------------------------------------------------------------------
// Convert float, double ... to string
template<class T> std::string toString(const T & t);
template<class T> std::string toStringVector(const T * t, const int n);
template<class T> std::string toStringVector(const T & t, const int n);
template<class T> std::string toStringVector(const std::vector<T> & t);
//--------------------------------------------------------------------
// Convert float, double ... to string
template<class T> std::string toString(const T & t);
template<class T> std::string toStringVector(const T * t, const int n);
template<class T> std::string toStringVector(const T & t, const int n);
template<class T> std::string toStringVector(const std::vector<T> & t);
std::ios_base& (*f)(std::ios_base&)=std::dec);
//--------------------------------------------------------------------
std::ios_base& (*f)(std::ios_base&)=std::dec);
//--------------------------------------------------------------------
//--------------------------------------------------------------------
// Return the indexes of sorted values in a vector
//--------------------------------------------------------------------
// Return the indexes of sorted values in a vector
//--------------------------------------------------------------------
// Convert radian / degree
double rad2deg(double anglerad);
//--------------------------------------------------------------------
// Convert radian / degree
double rad2deg(double anglerad);
template<class T1, class T2>
std::string CreateListOfTypes(bool last=true) {
if (last) return CreateListOfTypes<T1>()+" and "+CreateListOfTypes<T2>();
else return CreateListOfTypes<T1>()+", "+CreateListOfTypes<T2>();
}
template<class T1, class T2>
std::string CreateListOfTypes(bool last=true) {
if (last) return CreateListOfTypes<T1>()+" and "+CreateListOfTypes<T2>();
else return CreateListOfTypes<T1>()+", "+CreateListOfTypes<T2>();
}
template<class T1, class T2, class T3>
std::string CreateListOfTypes(bool last=true) {
if (last) return CreateListOfTypes<T1,T2>(false)+" and "+CreateListOfTypes<T3>();
template<class T1, class T2, class T3>
std::string CreateListOfTypes(bool last=true) {
if (last) return CreateListOfTypes<T1,T2>(false)+" and "+CreateListOfTypes<T3>();
else return CreateListOfTypes<T1,T2,T3,T4,T5,T6,T7>(false)+", "+CreateListOfTypes<T8>();
}
//--------------------------------------------------------------------
else return CreateListOfTypes<T1,T2,T3,T4,T5,T6,T7>(false)+", "+CreateListOfTypes<T8>();
}
//--------------------------------------------------------------------
//--------------------------------------------------------------------
void FindAndReplace(std::string & line, const std::string & tofind, const std::string & replacement);
void FindAndReplace(std::string & line, const std::vector<std::string> & tofind, const std::vector<std::string> & toreplace);
//--------------------------------------------------------------------
void FindAndReplace(std::string & line, const std::string & tofind, const std::string & replacement);
void FindAndReplace(std::string & line, const std::vector<std::string> & tofind, const std::vector<std::string> & toreplace);
//--------------------------------------------------------------------
//--------------------------------------------------------------------
//--------------------------------------------------------------------
//--------------------------------------------------------------------
- double ComputeEuclideanDistanceFromPointToPlane(const itk::ContinuousIndex<double, 3> point,
- const itk::ContinuousIndex<double, 3> pointInPlane,
+ double ComputeEuclideanDistanceFromPointToPlane(const itk::ContinuousIndex<double, 3> point,
+ const itk::ContinuousIndex<double, 3> pointInPlane,
const itk::ContinuousIndex<double, 3> normalPlane);
//--------------------------------------------------------------------
const itk::ContinuousIndex<double, 3> normalPlane);
//--------------------------------------------------------------------
void MapToVecSecond(const M & m, V & v);
//--------------------------------------------------------------------
void MapToVecSecond(const M & m, V & v);
//--------------------------------------------------------------------