Class SurfaceMaskLineImpl
java.lang.Object
cz.fidentis.analyst.data.surfacemask.impl.SurfaceMask2DImpl
cz.fidentis.analyst.data.surfacemask.impl.SurfaceMaskLineImpl
- All Implemented Interfaces:
SurfaceMask2D
,SurfaceMaskLine
Class representing surface mask as a sequence of points in 2D for operations in GUI
-
Nested Class Summary
Nested classes/interfaces inherited from interface cz.fidentis.analyst.data.surfacemask.SurfaceMask2D
SurfaceMask2D.PointToProject
Nested classes/interfaces inherited from interface cz.fidentis.analyst.data.surfacemask.SurfaceMaskLine
SurfaceMaskLine.MaskPoint, SurfaceMaskLine.MaskPointList
-
Field Summary
Fields inherited from interface cz.fidentis.analyst.data.surfacemask.SurfaceMaskLine
IN_BETWEEN_BBOX_OFFSET, POINT_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionParameterless construtorSurfaceMaskLineImpl
(SurfaceMaskLineImpl maskLine) Copy constructor -
Method Summary
Modifier and TypeMethodDescriptionboolean
addNewPoint
(Point point) Define a new point for the maskboolean
containsPoint
(Point location) check if location is within the mask shapevoid
deletePoint
(Point location) deletes a selected pointGets mask pointsGets a linked list of mask pointsGets a list of points from the mask and sampled points between any two mask pointsvoid
insertPoint
(Point location) Inserts a point in between two mask points.boolean
selectPoint
(Point location) Selects a point for further manipulationvoid
shiftMask
(int dx, int dy) Shifts the mask by a delta in the x and y direction.Methods inherited from class cz.fidentis.analyst.data.surfacemask.impl.SurfaceMask2DImpl
getSamplingStrength, getSelectedPoint, getShiftPoint, setSamplingStrength, setSelectedPoint, setShiftPoint, updateSelectedPoint
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface cz.fidentis.analyst.data.surfacemask.SurfaceMask2D
getSelectedPoint, getShiftPoint, setSamplingStrength, setSelectedPoint, setShiftPoint, updateSelectedPoint
-
Constructor Details
-
SurfaceMaskLineImpl
public SurfaceMaskLineImpl()Parameterless construtor -
SurfaceMaskLineImpl
Copy constructor- Parameters:
maskLine
- mask to copy
-
-
Method Details
-
getMaskPoints
Gets mask points- Returns:
- List of points
-
getMaskPointsList
Description copied from interface:SurfaceMaskLine
Gets a linked list of mask points- Specified by:
getMaskPointsList
in interfaceSurfaceMaskLine
- Returns:
- linked list
-
insertPoint
Inserts a point in between two mask points. Insertion happens only when mask is closed- Parameters:
location
- location to insert the new point
-
deletePoint
deletes a selected point- Specified by:
deletePoint
in interfaceSurfaceMaskLine
- Parameters:
location
- location of the point to be deleted
-
getPointsToProject
Gets a list of points from the mask and sampled points between any two mask points- Specified by:
getPointsToProject
in interfaceSurfaceMask2D
- Specified by:
getPointsToProject
in classSurfaceMask2DImpl
- Returns:
- points to project
-
shiftMask
public void shiftMask(int dx, int dy) Description copied from interface:SurfaceMask2D
Shifts the mask by a delta in the x and y direction. Delta is calculated from the previous and the current shift point- Specified by:
shiftMask
in interfaceSurfaceMask2D
- Specified by:
shiftMask
in classSurfaceMask2DImpl
- Parameters:
dx
- delta in the x directiondy
- delta in the y direction
-
selectPoint
Description copied from interface:SurfaceMask2D
Selects a point for further manipulation- Specified by:
selectPoint
in interfaceSurfaceMask2D
- Specified by:
selectPoint
in classSurfaceMask2DImpl
- Parameters:
location
- of the point to select- Returns:
- true if selected
-
addNewPoint
Description copied from interface:SurfaceMask2D
Define a new point for the mask- Specified by:
addNewPoint
in interfaceSurfaceMask2D
- Specified by:
addNewPoint
in classSurfaceMask2DImpl
- Parameters:
point
- new point to add- Returns:
- true if addition succeded
-
containsPoint
Description copied from interface:SurfaceMask2D
check if location is within the mask shape- Specified by:
containsPoint
in interfaceSurfaceMask2D
- Specified by:
containsPoint
in classSurfaceMask2DImpl
- Parameters:
location
- location to check- Returns:
- true is inside
-