14 #ifndef mitkAbstractGlobalImageFeature_h
15 #define mitkAbstractGlobalImageFeature_h
29 #include <itkeigen/Eigen/Dense>
52 std::string version =
"1";
205 itkSetMacro(Prefix, std::string);
207 itkSetMacro(ShortName, std::string);
209 itkSetMacro(LongName, std::string);
211 itkSetMacro(FeatureClassName, std::string);
213 itkSetMacro(Direction,
int);
225 m_Parameters = param;
226 this->ConfigureQuantifierSettingsByParameters();
227 this->ConfigureSettingsByParameters(param);
232 itkGetConstMacro(Prefix, std::string);
234 itkGetConstMacro(ShortName, std::string);
236 itkGetConstMacro(LongName, std::string);
238 itkGetConstMacro(FeatureClassName, std::string);
243 itkGetMacro(Quantifier, IntensityQuantifier::Pointer);
246 itkGetConstMacro(Direction,
int);
249 itkSetMacro(MinimumIntensity,
double);
251 itkSetMacro(UseMinimumIntensity,
bool);
253 itkSetMacro(MaximumIntensity,
double);
255 itkSetMacro(UseMaximumIntensity,
bool);
257 itkGetConstMacro(MinimumIntensity,
double);
259 itkGetConstMacro(UseMinimumIntensity,
bool);
261 itkGetConstMacro(MaximumIntensity,
double);
263 itkGetConstMacro(UseMaximumIntensity,
bool);
266 itkSetMacro(Binsize,
double);
268 itkSetMacro(UseBinsize,
bool);
270 itkGetConstMacro(Binsize,
double);
272 itkGetConstMacro(UseBinsize,
bool);
275 itkSetMacro(MorphMask, mitk::Image::Pointer);
277 itkGetConstMacro(MorphMask, mitk::Image::Pointer);
280 itkSetMacro(Bins,
int);
282 itkSetMacro(UseBins,
bool);
284 itkGetConstMacro(UseBins,
bool);
286 itkGetConstMacro(Bins,
int);
289 itkSetMacro(IgnoreMask,
bool);
291 itkGetConstMacro(IgnoreMask,
bool);
294 itkSetMacro(EncodeParametersInFeaturePrefix,
bool);
296 itkGetConstMacro(EncodeParametersInFeaturePrefix,
bool);
298 itkBooleanMacro(EncodeParametersInFeaturePrefix);
309 if (!m_Prefix.empty())
310 return m_Prefix +
"::" + m_ShortName;
369 if(IsInitialized() ==
false)
372 if(timeGeometry ==
nullptr)
379 std::string m_Prefix;
380 std::string m_ShortName;
381 std::string m_LongName;
382 std::string m_FeatureClassName;
383 ParametersType m_Parameters;
385 mitk::Image::Pointer m_MorphMask =
nullptr;
388 IntensityQuantifier::Pointer m_Quantifier;
390 double m_MinimumIntensity = 0;
391 bool m_UseMinimumIntensity =
false;
392 double m_MaximumIntensity = 100;
393 bool m_UseMaximumIntensity =
false;
394 bool m_EncodeParametersInFeaturePrefix =
false;
396 double m_Binsize = 1;
397 bool m_UseBinsize =
false;
400 bool m_UseBins =
true;
403 bool m_IgnoreMask =
false;
#define MITKCLCORE_EXPORT
Command line argument parser for MITK applications, based on the CTK command line parser.
std::string GetOptionPrefix() const
Build the full option prefix string for command line parameters.
virtual void CalculateAndAppendFeaturesSliceWise(const Image::Pointer &image, const Image::Pointer &mask, int sliceID, FeatureListType &featureList, bool checkParameterActivation=true)
Calculates the feature of this abstract interface. Does not necessarily considers the parameter setti...
void SetRequestedRegion(const itk::DataObject *) override
Set the requested region from this data object to match the requested region of the data object passe...
static std::string GenerateLegacyFeatureNameWOEncoding(const FeatureID &id)
bool RequestedRegionIsOutsideOfTheBufferedRegion() override
Determine whether the RequestedRegion is outside of the BufferedRegion.
void SetRequestedRegionToLargestPossibleRegion() override
Set the RequestedRegion to the LargestPossibleRegion.
std::vector< double > SplitDouble(std::string str, char delimiter)
void InitializeQuantifier(const Image *image, const Image *mask, unsigned int defaultBins=256)
virtual std::string GenerateLegacyFeatureEncoding(const FeatureID &id) const
FeatureListType CalculateFeaturesSlicewise(const Image::Pointer &image, const Image::Pointer &mask, int sliceID)
Calculates the given feature Slice-wise. Might not be available for an individual filter!
void SetParameters(ParametersType param)
Set the parameter map and reconfigure the instance accordingly.
FeatureID CreateTemplateFeatureID(std::string settingsSuffix="", FeatureID::ParametersType additionalParams={})
bool IsEmpty() const override
Check whether the object contains data at any time step.
std::string QuantifierParameterString() const
void CalculateAndAppendFeatures(const Image *image, const Image *mask, const Image *maskNoNaN, FeatureListType &featureList, bool checkParameterActivation=true)
Calculates the feature of this abstract interface. Does not necessarily considers the parameter setti...
virtual void AddArguments(mitkCommandLineParser &parser) const =0
virtual FeatureListType DoCalculateFeatures(const Image *image, const Image *mask)=0
FeatureListType CalculateFeatures(const Image *image, const Image *mask)
Calculates the feature of this abstract interface. Does not necessarily considers the parameter setti...
mitkClassMacro(AbstractGlobalImageFeature, BaseData)
void ConfigureQuantifierSettingsByParameters()
virtual void ConfigureSettingsByParameters(const ParametersType ¶meters)
virtual std::string GenerateLegacyFeatureNamePart(const FeatureID &id) const
void AddQuantifierArguments(mitkCommandLineParser &parser) const
virtual std::string GenerateLegacyFeatureName(const FeatureID &id) const
FeatureID::ParametersType ParametersType
std::vector< std::pair< FeatureID, double > > FeatureListType
bool VerifyRequestedRegion() override
Verify that the RequestedRegion is within the LargestPossibleRegion.
virtual FeatureListType CalculateFeatures(const Image *image, const Image *mask, const Image *maskNoNAN)=0
Base class of all data objects.
Image class for storing multi-dimensional medical image data.
bool operator<(const StaticParameterMap::ValueType &a, const StaticParameterMap::ValueType &b)
Compares two value lists by their first element.
Find image slices visible on a given plane.
MITKCLCORE_EXPORT FeatureID CreateFeatureID(FeatureID templateID, std::string name)
Create a FeatureID by cloning a template and setting its name.
MITKCORE_EXPORT bool operator==(const InteractionEvent &a, const InteractionEvent &b)
Unique identifier for a computed image feature.
std::string featureClass
Name of the feature class that computed this feature.
ParametersType parameters
Map of parameter name-value pairs used for computation.
std::string legacyName
Legacy feature name that encodes parameter settings directly in the string.
std::string settingID
Identifier encoding the parameter configuration; must be unique per parameter set.
std::string name
Name of the individual feature.
std::map< std::string, us::Any > ParametersType