Package adams.gui.tools.previewbrowser
Class ObjectLocationsFromReport
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.tools.previewbrowser.AbstractContentHandler
-
- adams.gui.tools.previewbrowser.ObjectLocationsFromReport
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,SizeOfHandler,BoundingBoxFallbackSupporter,ContentHandler,Serializable
public class ObjectLocationsFromReport extends AbstractContentHandler implements BoundingBoxFallbackSupporter
Displays the following image types with an overlay for the objects stored in the report with the same name (using object prefix 'Object.'): report,report.gz
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-image-reader <adams.data.io.input.AbstractImageReader> (property: imageReader) The image reader to use. default: adams.data.io.input.JAIImageReader
-reader <adams.data.io.input.AbstractReportReader> (property: reader) The reader to use for reading the report. default: adams.data.io.input.DefaultSimpleReportReader
-prefix <java.lang.String> (property: prefix) The prefix of fields in the report to identify as object location, eg 'Object. '. default: Object.
-color <java.awt.Color> (property: color) The color to use for the objects. default: #ff0000
-use-colors-per-type <boolean> (property: useColorsPerType) If enabled, individual colors per type are used. default: true
-type-color-provider <adams.gui.visualization.core.ColorProvider> (property: typeColorProvider) The color provider to use for the various types. default: adams.gui.visualization.core.DefaultColorProvider
-type-suffix <java.lang.String> (property: typeSuffix) The suffix of fields in the report to identify the type. default: .type
-type-regexp <adams.core.base.BaseRegExp> (property: typeRegExp) The regular expression that the types must match in order to get drawn ( eg only plotting a subset). default: .* more: https://docs.oracle.com/javase/tutorial/essential/regex/ https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html
-filled <boolean> (property: filled) If enabled, the shape is drawn filled. default: false
-outline-alpha <int> (property: outlineAlpha) This alpha is applied to the color of the outlines. default: 255 minimum: 0 maximum: 255
-polygon-bounds <boolean> (property: polygonBounds) If enabled, the polygon bounds are drawn as well. default: false
-label-format <java.lang.String> (property: labelFormat) The label format string to use for the rectangles; '#' for index, '@' for type and '$' for short type (type suffix must be defined for '@' and '$' ), '{BLAH}' gets replaced with the value associated with the meta-data key 'BLAH'; for instance: '# @' or '# {BLAH}'; in case of numeric values, use '|.X' to limit the number of decimals, eg '{BLAH|.2}' for a maximum of decimals after the decimal point. default: $-label-font <java.awt.Font> (property: labelFont) The font to use for the labels. default: Display-PLAIN-14
-label-anchor <TOP_LEFT|TOP_CENTER|TOP_RIGHT|MIDDLE_LEFT|MIDDLE_CENTER|MIDDLE_RIGHT|BOTTOM_LEFT|BOTTOM_CENTER|BOTTOM_RIGHT> (property: labelAnchor) The anchor for the label. default: TOP_RIGHT
-label-offset-x <int> (property: labelOffsetX) The X offset for the label; values of 0 or greater are interpreted as absolute pixels, -1 uses left as anchor, -2 the center and -3 the right. default: 0
-label-offset-y <int> (property: labelOffsetY) The Y offset for the label values of 0 or greater are interpreted as absolute pixels, -1 uses top as anchor, -2 the middle and -3 the bottom. default: 0
-predefined-labels <adams.core.base.BaseString> [-predefined-labels ...] (property: predefinedLabels) The predefined labels to use for setting up the colors; avoids constants changing in color pallet. default:
-vary-shape-color <boolean> (property: varyShapeColor) If enabled, the shape colors get varied. default: false
-shape-color-provider <adams.gui.visualization.core.ColorProvider> (property: shapeColorProvider) The color provider to use when varying the shape colors. default: adams.gui.visualization.core.TranslucentColorProvider -provider adams.gui.visualization.core.DefaultColorProvider
-finder <adams.data.objectfinder.ObjectFinder> (property: finder) The object finder to use. default: adams.data.objectfinder.AllFinder
-bounding-box-fallback-ratio <double> (property: boundingBoxFallbackRatio) The threshold for the ratio between the areas (shape / bbox), below which the bounding box is used over the polygon (ie bad masks/shapes). default: 0.0 minimum: 0.0 maximum: 1.0
-overlap-detection <adams.data.objectoverlap.ObjectOverlap> (property: overlapDetection) The algorithm to use for determining the overlapping objects. default: adams.data.objectoverlap.AreaRatio
-overlap-removal <adams.data.overlappingobjectremoval.OverlappingObjectRemoval> (property: overlapRemoval) The algorithm to use for removing the overlapping objects. default: adams.data.overlappingobjectremoval.PassThrough
-use-alternative-location <boolean> (property: useAlternativeLocation) If enabled, the alternative location is used to locate the associated report rather than the directory with the image. default: false
-alternative-location <adams.core.io.PlaceholderDirectory> (property: alternativeLocation) The alternative location to use look for associated reports. default: ${CWD}-show-object-panel <boolean> (property: showObjectPanel) If enabled, the panel for selecting located objects is being displayed. default: false
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classObjectLocationsFromReport.CombinedPanelThe panel for displaying the image.
-
Field Summary
Fields Modifier and Type Field Description protected Stringm_AlternativeFileSuffixthe alternative file suffix to use.protected PlaceholderDirectorym_AlternativeLocationthe alternative location.protected doublem_BoundingBoxFallbackRatiothe ratio used for determining whether to fall back from polygon on bbox.protected Colorm_Colorthe color for the objects.protected booleanm_Filledwhether to draw the shape filled.protected ObjectFinderm_Finderthe object finder to use.protected ImageReaderm_ImageReaderthe image reader to use.protected ImageAnchorm_LabelAnchorthe label anchor.protected Fontm_LabelFontthe label font.protected Stringm_LabelFormatthe label for the rectangles.protected intm_LabelOffsetXthe x offset for the label.protected intm_LabelOffsetYthe y offset for the label.protected intm_OutlineAlphathe alpha value to use for the outlines.protected ObjectOverlapm_OverlapDetectionthe object overlap calculation to use.protected OverlappingObjectRemovalm_OverlapRemovalthe object removal algorithm.protected booleanm_PolygonBoundswhether to draw the bounds of the polygon as well.protected BaseString[]m_PredefinedLabelsthe predefined labels.protected Stringm_Prefixthe prefix for the objects in the report.protected AbstractReportReaderm_Readerthe report reader to use.protected ColorProviderm_ShapeColorProviderthe color provider to use when varying the shape colors.protected booleanm_ShowObjectPanelwhether to show the located object panel.protected ColorProviderm_TypeColorProviderthe color provider to use.protected BaseRegExpm_TypeRegExpthe regular expression for the types to draw.protected Stringm_TypeSuffixthe suffix for the type.protected booleanm_UseAlternativeLocationwhether to use an alternative location for the reports.protected booleanm_UseColorsPerTypewhether to use colors per type.protected booleanm_VaryShapeColorwhether to vary the shape color.-
Fields inherited from class adams.gui.tools.previewbrowser.AbstractContentHandler
m_Relation
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
Fields inherited from interface adams.gui.tools.previewbrowser.ContentHandler
MATCH_ALL
-
-
Constructor Summary
Constructors Constructor Description ObjectLocationsFromReport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringalternativeFileSuffixTipText()Returns the tip text for this property.StringalternativeLocationTipText()Returns the tip text for this property.StringboundingBoxFallbackRatioTipText()Returns the tip text for this property.StringcolorTipText()Returns the tip text for this property.PreviewPanelcreatePreview(File file)Creates the actual view.voiddefineOptions()Adds options to the internal list of options.StringfilledTipText()Returns the tip text for this property.protected ReportfilterReport(Report report)Filters the objects in the report, if necessary.StringfinderTipText()Returns the tip text for this property.StringgetAlternativeFileSuffix()Returns the alternative file suffix to use for locating the associated spreadsheet, excluding the extension (eg '-rois').PlaceholderDirectorygetAlternativeLocation()Returns the alternative location to use for the reports.doublegetBoundingBoxFallbackRatio()Returns the ratio between shape area over bbox area.ColorgetColor()Returns the color to use for the objects.protected ImageReadergetDefaultImageReader()Returns the default image reader.protected ImageAnchorgetDefaultLabelAnchor()Returns the default label anchor.protected StringgetDefaultLabelFormat()Returns the default label format.protected intgetDefaultLabelOffsetX()Returns the default label offset for X.protected intgetDefaultLabelOffsetY()Returns the default label offset for Y.protected AbstractReportReadergetDefaultReader()Returns the default reader.protected booleangetDefaultUseColorsPerType()Returns the default for using colors per type.String[]getExtensions()Returns the list of extensions (without dot) that this handler can take care of.booleangetFilled()Returns whether to draw the shape filled.ObjectFindergetFinder()Returns the finder to use for locating the objects.ImageReadergetImageReader()Returns the image reader to use.ImageAnchorgetLabelAnchor()Returns the anchor for the label.FontgetLabelFont()Returns the label font.StringgetLabelFormat()Returns the label format.intgetLabelOffsetX()Returns the X offset for the label.intgetLabelOffsetY()Returns the Y offset for the label.intgetOutlineAlpha()Returns the alpha value to use when drawing the outlines.ObjectOverlapgetOverlapDetection()Returns the algorithm for determining the overlapping objects.OverlappingObjectRemovalgetOverlapRemoval()Returns the algorithm for determining the overlapping objects.booleangetPolygonBounds()Returns whether to draw the polygon bounds.BaseString[]getPredefinedLabels()Returns the predefined labels.StringgetPrefix()Returns the prefix to use for the objects in the report.AbstractReportReadergetReader()Returns the reader to use for reading the report.ColorProvidergetShapeColorProvider()Returns the color provider to use when varying the shape colors.booleangetShowObjectPanel()Returns whether to show the panel with the located objects.ColorProvidergetTypeColorProvider()Returns the color provider to use for the types.BaseRegExpgetTypeRegExp()Returns the regular expression that the types must match in order to get drawn.StringgetTypeSuffix()Returns the suffix to use for the types.booleangetUseAlternativeLocation()Returns whether to use an alternative location for the reports.booleangetUseColorsPerType()Returns whether to use colors per type.booleangetVaryShapeColor()Returns whether to vary the colors of the shapes.StringglobalInfo()Returns a string describing the object.StringimageReaderTipText()Returns the tip text for this property.StringlabelAnchorTipText()Returns the tip text for this property.StringlabelFontTipText()Returns the tip text for this property.StringlabelFormatTipText()Returns the tip text for this property.StringlabelOffsetXTipText()Returns the tip text for this property.StringlabelOffsetYTipText()Returns the tip text for this property.protected voidloadAdditionalReports(ObjectLocationsFromReport.CombinedPanel panel, File file, Report report)Hook method for loading additional reports.protected ReportloadReport(ObjectLocationsFromReport.CombinedPanel panel, File file)Loads the report associated with the image file.StringoutlineAlphaTipText()Returns the tip text for this property.StringoverlapDetectionTipText()Returns the tip text for this property.StringoverlapRemovalTipText()Returns the tip text for this property.StringpolygonBoundsTipText()Returns the tip text for this property.protected voidpostProcessPanel(ObjectLocationsFromReport.CombinedPanel panel, Report report, boolean isCreate)For post-processing the panel after creating or re-using it, before displaying it.StringpredefinedLabelsTipText()Returns the tip text for this property.StringprefixTipText()Returns the tip text for this property.StringreaderTipText()Returns the tip text for this property.PreviewPanelreusePreview(File file, PreviewPanel previewPanel)Reuses the last preview, if possible.voidsetAlternativeFileSuffix(String value)Sets the alternative file suffix to use for locating the associated spreadsheet, excluding the extension (eg '-rois').voidsetAlternativeLocation(PlaceholderDirectory value)Sets the alternative location to use for the reports.voidsetBoundingBoxFallbackRatio(double value)Sets the ratio between shape area over bbox area.voidsetColor(Color value)Sets the color to use for the objects.voidsetFilled(boolean value)Sets whether to draw the shape filled.voidsetFinder(ObjectFinder value)Sets the finder to use for locating the objects.voidsetImageReader(ImageReader value)Sets the image reader to use.voidsetLabelAnchor(ImageAnchor value)Sets the anchor for the label.voidsetLabelFont(Font value)Sets the label font.voidsetLabelFormat(String value)Sets the label format.voidsetLabelOffsetX(int value)Sets the X offset for the label.voidsetLabelOffsetY(int value)Sets the Y offset for the label.voidsetOutlineAlpha(int value)Sets the alpha value to use when drawing the outlines.voidsetOverlapDetection(ObjectOverlap value)Sets the algorithm for determining the overlapping objectsvoidsetOverlapRemoval(OverlappingObjectRemoval value)Sets the algorithm for determining the overlapping objectsvoidsetPolygonBounds(boolean value)Sets whether to draw the polygon bounds.voidsetPredefinedLabels(BaseString[] value)Sets the predefined labels.voidsetPrefix(String value)Sets the prefix to use for the objects in the report.voidsetReader(AbstractReportReader value)Sets the reader to use for reading the report.voidsetShapeColorProvider(ColorProvider value)Sets the color provider to use when varying the shape colors.voidsetShowObjectPanel(boolean value)Sets whether to show the panel with the located panels.voidsetTypeColorProvider(ColorProvider value)Sets the color provider to use for the types.voidsetTypeRegExp(BaseRegExp value)Sets the regular expression that the types must match in order to get drawn.voidsetTypeSuffix(String value)Sets the suffix to use for the types.voidsetUseAlternativeLocation(boolean value)Sets whether to use an alternative location for the reports.voidsetUseColorsPerType(boolean value)Sets whether to use colors per type.voidsetVaryShapeColor(boolean value)Sets whether to vary the colors of the shapes.StringshapeColorProviderTipText()Returns the tip text for this property.StringshowObjectPanelTipText()Returns the tip text for this property.StringtypeColorProviderTipText()Returns the tip text for this property.StringtypeRegExpTipText()Returns the tip text for this property.StringtypeSuffixTipText()Returns the tip text for this property.StringuseAlternativeLocationTipText()Returns the tip text for this property.StringuseColorsPerTypeTipText()Returns the tip text for this property.StringvaryShapeColorTipText()Returns the tip text for this property.-
Methods inherited from class adams.gui.tools.previewbrowser.AbstractContentHandler
checkFile, getHandlers, getHandlersForFile, getHandlersForFile, getPreview, getRelation, hasHandler, hasHandler
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_ImageReader
protected ImageReader m_ImageReader
the image reader to use.
-
m_Reader
protected AbstractReportReader m_Reader
the report reader to use.
-
m_AlternativeFileSuffix
protected String m_AlternativeFileSuffix
the alternative file suffix to use.
-
m_Prefix
protected String m_Prefix
the prefix for the objects in the report.
-
m_Color
protected Color m_Color
the color for the objects.
-
m_UseColorsPerType
protected boolean m_UseColorsPerType
whether to use colors per type.
-
m_TypeColorProvider
protected ColorProvider m_TypeColorProvider
the color provider to use.
-
m_TypeSuffix
protected String m_TypeSuffix
the suffix for the type.
-
m_TypeRegExp
protected BaseRegExp m_TypeRegExp
the regular expression for the types to draw.
-
m_Filled
protected boolean m_Filled
whether to draw the shape filled.
-
m_OutlineAlpha
protected int m_OutlineAlpha
the alpha value to use for the outlines.
-
m_PolygonBounds
protected boolean m_PolygonBounds
whether to draw the bounds of the polygon as well.
-
m_LabelFormat
protected String m_LabelFormat
the label for the rectangles.
-
m_LabelFont
protected Font m_LabelFont
the label font.
-
m_LabelAnchor
protected ImageAnchor m_LabelAnchor
the label anchor.
-
m_LabelOffsetX
protected int m_LabelOffsetX
the x offset for the label.
-
m_LabelOffsetY
protected int m_LabelOffsetY
the y offset for the label.
-
m_PredefinedLabels
protected BaseString[] m_PredefinedLabels
the predefined labels.
-
m_VaryShapeColor
protected boolean m_VaryShapeColor
whether to vary the shape color.
-
m_ShapeColorProvider
protected ColorProvider m_ShapeColorProvider
the color provider to use when varying the shape colors.
-
m_Finder
protected ObjectFinder m_Finder
the object finder to use.
-
m_BoundingBoxFallbackRatio
protected double m_BoundingBoxFallbackRatio
the ratio used for determining whether to fall back from polygon on bbox.
-
m_OverlapDetection
protected ObjectOverlap m_OverlapDetection
the object overlap calculation to use.
-
m_OverlapRemoval
protected OverlappingObjectRemoval m_OverlapRemoval
the object removal algorithm.
-
m_UseAlternativeLocation
protected boolean m_UseAlternativeLocation
whether to use an alternative location for the reports.
-
m_AlternativeLocation
protected PlaceholderDirectory m_AlternativeLocation
the alternative location.
-
m_ShowObjectPanel
protected boolean m_ShowObjectPanel
whether to show the located object panel.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
getDefaultImageReader
protected ImageReader getDefaultImageReader()
Returns the default image reader.- Returns:
- the default
-
setImageReader
public void setImageReader(ImageReader value)
Sets the image reader to use.- Parameters:
value- the reader
-
getImageReader
public ImageReader getImageReader()
Returns the image reader to use.- Returns:
- the reader
-
imageReaderTipText
public String imageReaderTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getDefaultReader
protected AbstractReportReader getDefaultReader()
Returns the default reader.- Returns:
- the reader
-
setReader
public void setReader(AbstractReportReader value)
Sets the reader to use for reading the report.- Parameters:
value- the reader
-
getReader
public AbstractReportReader getReader()
Returns the reader to use for reading the report.- Returns:
- the reader
-
readerTipText
public String readerTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setAlternativeFileSuffix
public void setAlternativeFileSuffix(String value)
Sets the alternative file suffix to use for locating the associated spreadsheet, excluding the extension (eg '-rois').- Parameters:
value- the suffix
-
getAlternativeFileSuffix
public String getAlternativeFileSuffix()
Returns the alternative file suffix to use for locating the associated spreadsheet, excluding the extension (eg '-rois').- Returns:
- the suffix
-
alternativeFileSuffixTipText
public String alternativeFileSuffixTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setPrefix
public void setPrefix(String value)
Sets the prefix to use for the objects in the report.- Parameters:
value- the prefix
-
getPrefix
public String getPrefix()
Returns the prefix to use for the objects in the report.- Returns:
- the prefix
-
prefixTipText
public String prefixTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setColor
public void setColor(Color value)
Sets the color to use for the objects.- Parameters:
value- the color
-
getColor
public Color getColor()
Returns the color to use for the objects.- Returns:
- the color
-
colorTipText
public String colorTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getDefaultUseColorsPerType
protected boolean getDefaultUseColorsPerType()
Returns the default for using colors per type.- Returns:
- the default
-
setUseColorsPerType
public void setUseColorsPerType(boolean value)
Sets whether to use colors per type.- Parameters:
value- true if to use colors per type
-
getUseColorsPerType
public boolean getUseColorsPerType()
Returns whether to use colors per type.- Returns:
- true if to use colors per type
-
useColorsPerTypeTipText
public String useColorsPerTypeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setTypeColorProvider
public void setTypeColorProvider(ColorProvider value)
Sets the color provider to use for the types.- Parameters:
value- the provider
-
getTypeColorProvider
public ColorProvider getTypeColorProvider()
Returns the color provider to use for the types.- Returns:
- the provider
-
typeColorProviderTipText
public String typeColorProviderTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setTypeSuffix
public void setTypeSuffix(String value)
Sets the suffix to use for the types.- Parameters:
value- the suffix
-
getTypeSuffix
public String getTypeSuffix()
Returns the suffix to use for the types.- Returns:
- the suffix
-
typeSuffixTipText
public String typeSuffixTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setTypeRegExp
public void setTypeRegExp(BaseRegExp value)
Sets the regular expression that the types must match in order to get drawn.- Parameters:
value- the expression
-
getTypeRegExp
public BaseRegExp getTypeRegExp()
Returns the regular expression that the types must match in order to get drawn.- Returns:
- the expression
-
typeRegExpTipText
public String typeRegExpTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setFilled
public void setFilled(boolean value)
Sets whether to draw the shape filled.- Parameters:
value- true if to fill
-
getFilled
public boolean getFilled()
Returns whether to draw the shape filled.- Returns:
- true if to fill
-
filledTipText
public String filledTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOutlineAlpha
public void setOutlineAlpha(int value)
Sets the alpha value to use when drawing the outlines.- Parameters:
value- the alpha value (0: transparent, 255: opaque)
-
getOutlineAlpha
public int getOutlineAlpha()
Returns the alpha value to use when drawing the outlines.- Returns:
- the alpha value (0: transparent, 255: opaque)
-
outlineAlphaTipText
public String outlineAlphaTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setPolygonBounds
public void setPolygonBounds(boolean value)
Sets whether to draw the polygon bounds.- Parameters:
value- true if to draw bounds
-
getPolygonBounds
public boolean getPolygonBounds()
Returns whether to draw the polygon bounds.- Returns:
- true if to draw bounds
-
polygonBoundsTipText
public String polygonBoundsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getDefaultLabelFormat
protected String getDefaultLabelFormat()
Returns the default label format.- Returns:
- the default
-
setLabelFormat
public void setLabelFormat(String value)
Sets the label format.- Parameters:
value- the label format
-
getLabelFormat
public String getLabelFormat()
Returns the label format.- Returns:
- the label format
-
labelFormatTipText
public String labelFormatTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setLabelFont
public void setLabelFont(Font value)
Sets the label font.- Parameters:
value- the label font
-
getLabelFont
public Font getLabelFont()
Returns the label font.- Returns:
- the label font
-
labelFontTipText
public String labelFontTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getDefaultLabelAnchor
protected ImageAnchor getDefaultLabelAnchor()
Returns the default label anchor.- Returns:
- the default
-
setLabelAnchor
public void setLabelAnchor(ImageAnchor value)
Sets the anchor for the label.- Parameters:
value- the anchor
-
getLabelAnchor
public ImageAnchor getLabelAnchor()
Returns the anchor for the label.- Returns:
- the anchor
-
labelAnchorTipText
public String labelAnchorTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getDefaultLabelOffsetX
protected int getDefaultLabelOffsetX()
Returns the default label offset for X.- Returns:
- the default
-
setLabelOffsetX
public void setLabelOffsetX(int value)
Sets the X offset for the label.- Parameters:
value- the X offset
-
getLabelOffsetX
public int getLabelOffsetX()
Returns the X offset for the label.- Returns:
- the X offset
-
labelOffsetXTipText
public String labelOffsetXTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getDefaultLabelOffsetY
protected int getDefaultLabelOffsetY()
Returns the default label offset for Y.- Returns:
- the default
-
setLabelOffsetY
public void setLabelOffsetY(int value)
Sets the Y offset for the label.- Parameters:
value- the Y offset
-
getLabelOffsetY
public int getLabelOffsetY()
Returns the Y offset for the label.- Returns:
- the Y offset
-
labelOffsetYTipText
public String labelOffsetYTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setPredefinedLabels
public void setPredefinedLabels(BaseString[] value)
Sets the predefined labels.- Parameters:
value- the labels
-
getPredefinedLabels
public BaseString[] getPredefinedLabels()
Returns the predefined labels.- Returns:
- the labels
-
predefinedLabelsTipText
public String predefinedLabelsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setVaryShapeColor
public void setVaryShapeColor(boolean value)
Sets whether to vary the colors of the shapes.- Parameters:
value- true if to vary
-
getVaryShapeColor
public boolean getVaryShapeColor()
Returns whether to vary the colors of the shapes.- Returns:
- true if to vary
-
varyShapeColorTipText
public String varyShapeColorTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setShapeColorProvider
public void setShapeColorProvider(ColorProvider value)
Sets the color provider to use when varying the shape colors.- Parameters:
value- the provider
-
getShapeColorProvider
public ColorProvider getShapeColorProvider()
Returns the color provider to use when varying the shape colors.- Returns:
- the provider
-
shapeColorProviderTipText
public String shapeColorProviderTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setFinder
public void setFinder(ObjectFinder value)
Sets the finder to use for locating the objects.- Parameters:
value- the finder
-
getFinder
public ObjectFinder getFinder()
Returns the finder to use for locating the objects.- Returns:
- the finder
-
finderTipText
public String finderTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setBoundingBoxFallbackRatio
public void setBoundingBoxFallbackRatio(double value)
Sets the ratio between shape area over bbox area. If below the bbox is used instead of the polygon.- Specified by:
setBoundingBoxFallbackRatioin interfaceBoundingBoxFallbackSupporter- Parameters:
value- the ratio
-
getBoundingBoxFallbackRatio
public double getBoundingBoxFallbackRatio()
Returns the ratio between shape area over bbox area. If below the bbox is used instead of the polygon.- Specified by:
getBoundingBoxFallbackRatioin interfaceBoundingBoxFallbackSupporter- Returns:
- the ratio
-
boundingBoxFallbackRatioTipText
public String boundingBoxFallbackRatioTipText()
Returns the tip text for this property.- Specified by:
boundingBoxFallbackRatioTipTextin interfaceBoundingBoxFallbackSupporter- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOverlapDetection
public void setOverlapDetection(ObjectOverlap value)
Sets the algorithm for determining the overlapping objects- Parameters:
value- the algorithm
-
getOverlapDetection
public ObjectOverlap getOverlapDetection()
Returns the algorithm for determining the overlapping objects.- Returns:
- the algorithm
-
overlapDetectionTipText
public String overlapDetectionTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOverlapRemoval
public void setOverlapRemoval(OverlappingObjectRemoval value)
Sets the algorithm for determining the overlapping objects- Parameters:
value- the algorithm
-
getOverlapRemoval
public OverlappingObjectRemoval getOverlapRemoval()
Returns the algorithm for determining the overlapping objects.- Returns:
- the algorithm
-
overlapRemovalTipText
public String overlapRemovalTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setUseAlternativeLocation
public void setUseAlternativeLocation(boolean value)
Sets whether to use an alternative location for the reports.- Parameters:
value- true if to use
-
getUseAlternativeLocation
public boolean getUseAlternativeLocation()
Returns whether to use an alternative location for the reports.- Returns:
- true if to use
-
useAlternativeLocationTipText
public String useAlternativeLocationTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setAlternativeLocation
public void setAlternativeLocation(PlaceholderDirectory value)
Sets the alternative location to use for the reports.- Parameters:
value- the location
-
getAlternativeLocation
public PlaceholderDirectory getAlternativeLocation()
Returns the alternative location to use for the reports.- Returns:
- the location
-
alternativeLocationTipText
public String alternativeLocationTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setShowObjectPanel
public void setShowObjectPanel(boolean value)
Sets whether to show the panel with the located panels.- Parameters:
value- true if to show
-
getShowObjectPanel
public boolean getShowObjectPanel()
Returns whether to show the panel with the located objects.- Returns:
- true if to show
-
showObjectPanelTipText
public String showObjectPanelTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getExtensions
public String[] getExtensions()
Returns the list of extensions (without dot) that this handler can take care of.- Specified by:
getExtensionsin interfaceContentHandler- Returns:
- the list of extensions (no dot)
-
filterReport
protected Report filterReport(Report report)
Filters the objects in the report, if necessary.- Parameters:
report- the report to filter- Returns:
- the filtered report (copy, in case filtering occurred)
-
loadAdditionalReports
protected void loadAdditionalReports(ObjectLocationsFromReport.CombinedPanel panel, File file, Report report)
Hook method for loading additional reports.
The default implementation does nothing.- Parameters:
panel- the context panelfile- the image filereport- the current report
-
loadReport
protected Report loadReport(ObjectLocationsFromReport.CombinedPanel panel, File file)
Loads the report associated with the image file.- Parameters:
panel- the context panelfile- the image file- Returns:
- the report, null if not present or failed to load
-
postProcessPanel
protected void postProcessPanel(ObjectLocationsFromReport.CombinedPanel panel, Report report, boolean isCreate)
For post-processing the panel after creating or re-using it, before displaying it.
Default implementation does nothing.- Parameters:
panel- the panel to updatereport- the current reportisCreate- whether this is when creating the panel (true) or when reusing (false)
-
createPreview
public PreviewPanel createPreview(File file)
Creates the actual view.- Specified by:
createPreviewin interfaceContentHandler- Specified by:
createPreviewin classAbstractContentHandler- Parameters:
file- the file to create the view for- Returns:
- the view
-
reusePreview
public PreviewPanel reusePreview(File file, PreviewPanel previewPanel)
Reuses the last preview, if possible.- Specified by:
reusePreviewin interfaceContentHandler- Overrides:
reusePreviewin classAbstractContentHandler- Parameters:
file- the file to create the view for- Returns:
- the view
-
-