#ifndef clitkImageStatisticsGenericFilter_h
#define clitkImageStatisticsGenericFilter_h
-/* =================================================
- * @file clitkImageStatisticsGenericFilter.h
- * @author
- * @date
- *
- * @brief
- *
- ===================================================*/
-
-
// clitk include
#include "clitkIO.h"
#include "clitkCommon.h"
namespace clitk
{
-
class ITK_EXPORT ImageStatisticsGenericFilter : public itk::LightObject
{
public:
{
m_ArgsInfo=a;
m_Verbose=m_ArgsInfo.verbose_flag;
- m_InputFileName=m_ArgsInfo.input_arg;
+ m_Localize=m_ArgsInfo.localize_flag;
+
+ if(m_ArgsInfo.input_given)
+ m_InputFileName=m_ArgsInfo.input_arg[0];
+ else if(m_ArgsInfo.inputs_num>0)
+ m_InputFileName=m_ArgsInfo.inputs[0];
+ else {
+ std::cerr << "You must give an input file name" << std::endl;
+ exit(1);
+ }
}
//----------------------------------------
// Templated members
//----------------------------------------
- template <unsigned int Dimension> void UpdateWithDim(std::string PixelType);
- template <unsigned int Dimension, class PixelType> void UpdateWithDimAndPixelType();
+ template <unsigned int Dimension, unsigned int Components> void UpdateWithDim(std::string PixelType);
+ template <unsigned int Dimension, class PixelType, unsigned int Components> void UpdateWithDimAndPixelType();
//----------------------------------------
// Data members
//----------------------------------------
args_info_clitkImageStatistics m_ArgsInfo;
- bool m_Verbose;
+ bool m_Verbose, m_Localize;
std::string m_InputFileName;
};