Class: ContoursFactory

ContoursFactory(viewer)

A class to create and to manage contours in the 2D part of YAFITS. A contour is a close line joining pixels sharing a given value: the contour level. Contours are created and manipulated with the OpenLayers API. In particular Feature and LineString classes are used. This class only allows to create the contours as OpenLayers features and to define their behaviour in front of end user interactions. How the contour levels are defined and how their edges are calculated are tasks accomplished by instances of the class ContoursFactoryGUI. this.button = document.createElement("button");

Constructor

new ContoursFactory(viewer)

Creates an instance
Parameters:
Name Type Description
viewer Viewer instance of the Viewer class that will host the contours.
Source:

Extends

Members

mode

A mutator defining the kind of subclass.
Overrides:
Source:

Methods

close()

Close this factory. Disable its interaction processor.
Overrides:
Source:

getButtonObject()

Utility. Returns the toolbox button that will activate this instance.
Source:
Returns:
a button

getMeasureContourPromise(feature, relFITSFilePath)

Promise - Define the behaviour when a contour is selected on the graphic interface.
Parameters:
Name Type Description
feature LineStringFeature The contour of area to measure
relFITSFilePath string the path to the FITS file of interest.
Source:
Returns:

hide()

Hide all the objects created by one subclass. (e.g. all the markers)
Overrides:
Source:

importYAFITSContours(yAFITSContours)

Adds an array of LineStringFeature to the Viewer and draws them.
Parameters:
Name Type Description
yAFITSContours Array.<LineStringFeature> an array of LineStringFeature.
Source:

open(interaction, cursor)

Make this factory active. Displays a cursor ( expectedly characteristic of the factory subclass ) and define the interaction in use as long as it's active.
Parameters:
Name Type Description
interaction Interaction in the OpenLayers meaning
cursor string A name picked in the standard CSS - Cursors list
Overrides:
Source:
See:

remove(feature)

Remove one object created by a subclass.
Parameters:
Name Type Description
feature * the object to remove.
Overrides:
Source:

selected(feature)

Modify the look of feature to show that it's been selected. ( e.g. highlite it )
Parameters:
Name Type Description
feature An instance created by a subclass
Overrides:
Source:

show()

Make visible all the objects created by one subclass. (e.g. all the markers)
Overrides:
Source:

unselected(feature)

Modify the look of feature to show that it's been unselected. ( e.g. display it normally )
Parameters:
Name Type Description
feature an instance created by a subclass.
Overrides:
Source: