14 #ifndef mitkAbstractGlobalImageFeature_h
15 #define mitkAbstractGlobalImageFeature_h
29 #include <itkeigen/Eigen/Dense>
49 std::string version =
"1";
186 itkSetMacro(Prefix, std::string);
187 itkSetMacro(ShortName, std::string);
188 itkSetMacro(LongName, std::string);
189 itkSetMacro(FeatureClassName, std::string);
190 itkSetMacro(Direction,
int);
194 m_Parameters = param;
195 this->ConfigureQuantifierSettingsByParameters();
196 this->ConfigureSettingsByParameters(param);
200 itkGetConstMacro(Prefix, std::string);
201 itkGetConstMacro(ShortName, std::string);
202 itkGetConstMacro(LongName, std::string);
203 itkGetConstMacro(FeatureClassName, std::string);
206 itkGetMacro(Quantifier, IntensityQuantifier::Pointer);
208 itkGetConstMacro(Direction,
int);
210 itkSetMacro(MinimumIntensity,
double);
211 itkSetMacro(UseMinimumIntensity,
bool);
212 itkSetMacro(MaximumIntensity,
double);
213 itkSetMacro(UseMaximumIntensity,
bool);
214 itkGetConstMacro(MinimumIntensity,
double);
215 itkGetConstMacro(UseMinimumIntensity,
bool);
216 itkGetConstMacro(MaximumIntensity,
double);
217 itkGetConstMacro(UseMaximumIntensity,
bool);
220 itkSetMacro(Binsize,
double);
221 itkSetMacro(UseBinsize,
bool);
222 itkGetConstMacro(Binsize,
double);
223 itkGetConstMacro(UseBinsize,
bool);
228 itkSetMacro(Bins,
int);
229 itkSetMacro(UseBins,
bool);
230 itkGetConstMacro(UseBins,
bool);
231 itkGetConstMacro(Bins,
int);
233 itkSetMacro(IgnoreMask,
bool);
234 itkGetConstMacro(IgnoreMask,
bool);
236 itkSetMacro(EncodeParametersInFeaturePrefix,
bool);
237 itkGetConstMacro(EncodeParametersInFeaturePrefix,
bool);
238 itkBooleanMacro(EncodeParametersInFeaturePrefix);
242 if (!m_Prefix.empty())
243 return m_Prefix +
"::" + m_ShortName;
302 if(IsInitialized() ==
false)
305 if(timeGeometry ==
nullptr)
312 std::string m_Prefix;
313 std::string m_ShortName;
314 std::string m_LongName;
315 std::string m_FeatureClassName;
316 ParametersType m_Parameters;
321 IntensityQuantifier::Pointer m_Quantifier;
323 double m_MinimumIntensity = 0;
324 bool m_UseMinimumIntensity =
false;
325 double m_MaximumIntensity = 100;
326 bool m_UseMaximumIntensity =
false;
327 bool m_EncodeParametersInFeaturePrefix =
false;
329 double m_Binsize = 1;
330 bool m_UseBinsize =
false;
333 bool m_UseBins =
true;
336 bool m_IgnoreMask =
false;
#define MITKCLCORE_EXPORT
std::string GetOptionPrefix() const
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)
FeatureID CreateTemplateFeatureID(std::string settingsSuffix="", FeatureID::ParametersType additionalParams={})
bool IsEmpty() const override
Check whether object contains data (at least at one point in time), e.g., a set of points may be empt...
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 of all data objects.
Image class for storing images.
bool operator<(const StaticParameterMap::ValueType &a, const StaticParameterMap::ValueType &b)
Compares two var lists and returns true if the first list's first item is lower than the second one's...
Find image slices visible on a given plane.
MITKCLCORE_EXPORT FeatureID CreateFeatureID(FeatureID templateID, std::string name)
MITKCORE_EXPORT bool operator==(const InteractionEvent &a, const InteractionEvent &b)
ParametersType parameters
std::map< std::string, us::Any > ParametersType