14 #ifndef mitkAbstractGlobalImageFeature_h 15 #define mitkAbstractGlobalImageFeature_h 29 #include <Eigen/Dense> 49 std::string version =
"1";
162 FeatureListType CalculateFeatures(
const Image* image,
const Image* mask);
163 virtual FeatureListType CalculateFeatures(
const Image* image,
const Image* mask,
const Image* maskNoNAN) = 0;
173 virtual void CalculateAndAppendFeaturesSliceWise(
const Image::Pointer & image,
const Image::Pointer &mask,
int sliceID, FeatureListType &featureList,
bool checkParameterActivation =
true);
184 void CalculateAndAppendFeatures(
const Image* image,
const Image* mask,
const Image* maskNoNaN, FeatureListType &featureList,
bool checkParameterActivation =
true);
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);
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;
254 static std::string GenerateLegacyFeatureNameWOEncoding(
const FeatureID&
id);
257 std::vector<double> SplitDouble(std::string str,
char delimiter);
259 virtual FeatureListType DoCalculateFeatures(
const Image* image,
const Image* mask) = 0;
264 void ConfigureQuantifierSettingsByParameters();
268 virtual void ConfigureSettingsByParameters(
const ParametersType& parameters);
271 void InitializeQuantifier(
const Image* image,
const Image* mask,
unsigned int defaultBins = 256);
274 std::string QuantifierParameterString()
const;
286 virtual std::string GenerateLegacyFeatureName(
const FeatureID&
id)
const;
287 virtual std::string GenerateLegacyFeatureNamePart(
const FeatureID&
id)
const;
288 virtual std::string GenerateLegacyFeatureEncoding(
const FeatureID&
id)
const;
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;
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;
342 #endif //mitkAbstractGlobalImageFeature_h MITKCORE_EXPORT bool operator==(const InteractionEvent &a, const InteractionEvent &b)
void SetRequestedRegion(const itk::DataObject *) override
Set the requested region from this data object to match the requested region of the data object passe...
Base of all data objects.
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...
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...
DataCollection - Class to facilitate loading/accessing structured data.
bool VerifyRequestedRegion() override
Verify that the RequestedRegion is within the LargestPossibleRegion.
bool RequestedRegionIsOutsideOfTheBufferedRegion() override
Determine whether the RequestedRegion is outside of the BufferedRegion.
#define MITKCLCORE_EXPORT
void SetRequestedRegionToLargestPossibleRegion() override
Set the RequestedRegion to the LargestPossibleRegion.
#define mitkClassMacro(className, SuperClassName)
Image class for storing images.
std::string GetOptionPrefix() const
std::vector< std::pair< FeatureID, double > > FeatureListType
FeatureID::ParametersType ParametersType
std::map< std::string, us::Any > ParametersType
void SetParameters(ParametersType param)
MITKCLCORE_EXPORT FeatureID CreateFeatureID(FeatureID templateID, std::string name)
itk::SmartPointer< Self > Pointer
ParametersType parameters