Class ExportFeaturesStyle
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionExportFeaturesStyle
(boolean removeNaNColumns, boolean visuallyShortenDecimals, boolean suppressErrors) Creates a newExportFeaturesStyle
instance. -
Method Summary
Modifier and TypeMethodDescriptionderiveContext
(InputOutputContext context) Derives aFeatureExporterContext
from the current style and given context.boolean
When true, columns containing allDouble.NaN
values are removed before outputting.boolean
When false, an image is reported as errored, if any exception is thrown during calculation.boolean
When true, feature-values are shown as visually compressed as possible, including suppressing decimal places.void
setRemoveNaNColumns
(boolean removeNaNColumns) When true, columns containing allDouble.NaN
values are removed before outputting.void
setSuppressErrors
(boolean suppressErrors) When false, an image is reported as errored, if any exception is thrown during calculation.void
setVisuallyShortenDecimals
(boolean visuallyShortenDecimals) When true, feature-values are shown as visually compressed as possible, including suppressing decimal places.Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
ExportFeaturesStyle
public ExportFeaturesStyle() -
ExportFeaturesStyle
public ExportFeaturesStyle(boolean removeNaNColumns, boolean visuallyShortenDecimals, boolean suppressErrors) Creates a newExportFeaturesStyle
instance.- Parameters:
removeNaNColumns
- When true, columns containing allDouble.NaN
values are removed before outputting.When false, all columns are included.
visuallyShortenDecimals
- When true, feature-values are shown as visually compressed as possible, including suppressing decimal places.When false, a fixed number of decimal places is shown for all feature-values.
e.g. when true,
2
is shown instead of2.0000000000
or6.71
instead of6.71000000000000
suppressErrors
- When false, an image is reported as errored, if any exception is thrown during calculation.When true, then a value of
Double.NaN
is returned, and a message is written to the error-log.
-
-
Method Details
-
deriveContext
Derives aFeatureExporterContext
from the current style and given context.- Parameters:
context
- theInputOutputContext
to use for deriving the new context.- Returns:
- a new
FeatureExporterContext
instance.
-
isRemoveNaNColumns
public boolean isRemoveNaNColumns()When true, columns containing allDouble.NaN
values are removed before outputting.When false, all columns are included.
-
setRemoveNaNColumns
public void setRemoveNaNColumns(boolean removeNaNColumns) When true, columns containing allDouble.NaN
values are removed before outputting.When false, all columns are included.
-
isVisuallyShortenDecimals
public boolean isVisuallyShortenDecimals()When true, feature-values are shown as visually compressed as possible, including suppressing decimal places.When false, a fixed number of decimal places is shown for all feature-values.
e.g. when true,
2
is shown instead of2.0000000000
or6.71
instead of6.71000000000000
-
setVisuallyShortenDecimals
public void setVisuallyShortenDecimals(boolean visuallyShortenDecimals) When true, feature-values are shown as visually compressed as possible, including suppressing decimal places.When false, a fixed number of decimal places is shown for all feature-values.
e.g. when true,
2
is shown instead of2.0000000000
or6.71
instead of6.71000000000000
-
isSuppressErrors
public boolean isSuppressErrors()When false, an image is reported as errored, if any exception is thrown during calculation.When true, then a value of
Double.NaN
is returned, and a message is written to the error-log. -
setSuppressErrors
public void setSuppressErrors(boolean suppressErrors) When false, an image is reported as errored, if any exception is thrown during calculation.When true, then a value of
Double.NaN
is returned, and a message is written to the error-log.
-