C# Class SANTA.Controller.Master

The Master controller class which controls all flow in the SANTA system.
Datei anzeigen Open project: siegleal/iSanta Class Usage Examples

Protected Properties

Property Type Description
_configReader SANTA.IO.ConfigReader
_fileNames String[]
_imageData Datatype.ImageData[]
_stats Datatype.Stats[]

Public Methods

Method Description
AddCaliberUnit ( Datatype caliberUnit ) : void

See IO.AddCaliberUnit().

AddWeaponName ( String weaponName ) : void

See IO.AddWeaponName().

GenerateReport ( int index, String reportPath ) : void

Generates an Excel report of the image data.

GetCaliberUnits ( ) : List

See IO.GetCaliberUnits().

GetDiameterInPixels ( int index ) : int

Returns the diameter of a bullet hole in pixels.

GetFileNames ( ) : String[]

Returns the list of filenames being processed.

GetImageData ( int index ) : Datatype.ImageData

Returns the image data for a particular image.

GetNumberOfImages ( ) : int

Returns the number of images to be processed.

GetWeaponNames ( ) : List

See IO.GetWeaponNames().

LoadData ( List targetIDs ) : String>.Dictionary

Loads the list of TargetIDs from the database.

Master ( ) : System

Constructs a Master object by initializing the ConfigReader and the UIController.

ProcessImage ( int index, Datatype partialImageData ) : IList

Processes the given image and returns a list of potential bullet holes.

SaveData ( int index ) : int

Saves the image data for a particular image.

SetFileNames ( String fileNames ) : void

Sets the filenames to the array of input filenames.

SetPoints ( int index, List points ) : void

Sets the point coordinates of bullet holes for an image.

setImageData ( int index, Datatype imageData ) : void

Sets the image data at a particular index.

Protected Methods

Method Description
CheckStats ( int index ) : void

Checks to see if the statistics for an image are current and updates them if necessary.

Private Methods

Method Description
GetConfigReader ( ) : ConfigReader

Returns the local ConfigReader object.

Method Details

AddCaliberUnit() public method

See IO.AddCaliberUnit().
public AddCaliberUnit ( Datatype caliberUnit ) : void
caliberUnit Datatype
return void

AddWeaponName() public method

See IO.AddWeaponName().
public AddWeaponName ( String weaponName ) : void
weaponName String
return void

CheckStats() protected method

Checks to see if the statistics for an image are current and updates them if necessary.
protected CheckStats ( int index ) : void
index int The index of the image.
return void

GenerateReport() public method

Generates an Excel report of the image data.
public GenerateReport ( int index, String reportPath ) : void
index int The index of the image.
reportPath String The filepath to save the report.
return void

GetCaliberUnits() public method

See IO.GetCaliberUnits().
public GetCaliberUnits ( ) : List
return List

GetDiameterInPixels() public method

Returns the diameter of a bullet hole in pixels.
public GetDiameterInPixels ( int index ) : int
index int The index of the image.
return int

GetFileNames() public method

Returns the list of filenames being processed.
public GetFileNames ( ) : String[]
return String[]

GetImageData() public method

Returns the image data for a particular image.
public GetImageData ( int index ) : Datatype.ImageData
index int The index of the image for which to return data.
return Datatype.ImageData

GetNumberOfImages() public method

Returns the number of images to be processed.
public GetNumberOfImages ( ) : int
return int

GetWeaponNames() public method

See IO.GetWeaponNames().
public GetWeaponNames ( ) : List
return List

LoadData() public method

Loads the list of TargetIDs from the database.
The list of targetIDs is empty.
public LoadData ( List targetIDs ) : String>.Dictionary
targetIDs List The list of TargetIDs to load.
return String>.Dictionary

Master() public method

Constructs a Master object by initializing the ConfigReader and the UIController.
public Master ( ) : System
return System

ProcessImage() public method

Processes the given image and returns a list of potential bullet holes.
Thrown if there is a problem with the file, region of interest, /// caliber, or scale.
public ProcessImage ( int index, Datatype partialImageData ) : IList
index int The index of the image to process.
partialImageData Datatype The partial image data specifically containing the filename, number of shots /// fired, caliber information, scaling information, and region of interest.
return IList

SaveData() public method

Saves the image data for a particular image.
public SaveData ( int index ) : int
index int The index of the image to save.
return int

SetFileNames() public method

Sets the filenames to the array of input filenames.
public SetFileNames ( String fileNames ) : void
fileNames String The filenames of the target images.
return void

SetPoints() public method

Sets the point coordinates of bullet holes for an image.
public SetPoints ( int index, List points ) : void
index int The index of the image.
points List The point coordinates of the bullet holes.
return void

setImageData() public method

Sets the image data at a particular index.
public setImageData ( int index, Datatype imageData ) : void
index int The index at which to set to image data.
imageData Datatype The image data to set.
return void

Property Details

_configReader protected_oe property

The ConfigReader for the configuration file.
protected ConfigReader,SANTA.IO _configReader
return SANTA.IO.ConfigReader

_fileNames protected_oe property

The array of filenames being processed.
protected String[] _fileNames
return String[]

_imageData protected_oe property

The array of image data for each image being processed.
protected Datatype.ImageData[] _imageData
return Datatype.ImageData[]

_stats protected_oe property

The array of statistical information for each image being processed.
protected Datatype.Stats[] _stats
return Datatype.Stats[]