NIREP

NIREPDataManager Class Reference

The Data Manager is responsible for managing all image and metric data within NIREP. This includes responsibility for handling queries from other components for access to various types of data, as well as memory management functions such as dynamic movement of images between memory and disk and compression/decompression of data. The data manager is designed to retain the results of computationally intensive operations on data elements in order to avoid re-computation of these operations to satisfy future requests. There is only one data manager per NIREP session. Its creation is initiated by the user via the Interface. It is also responsible for handling queries into the database which might involve other components asking for descriptive information associated with various data elements such as date when an element was generated, the process that generated it, any associated identifiers, etc. It is also responsible for supplying handles to the requested data to the various components that request them. It also is responsible for managing metric data that contains information pertaining to evaluation or comparisons of algorithms over data elements. Since some of the transformation information may be available in compressed form, the data manager also compresses or decompresses this information for use when speed is required, or when storage space is needed. The data manager is also responsible for storing data that might have been generated by the user as a result of various applications of operations upon the various data elements available in the database. This storage also might require the exact sequence of operations involved leading to the creation of the data. The data manager also manages the Display Manager state. More...

Collaboration diagram for NIREPDataManager:

List of all members.

Classes

class  spatialDataResourceList

Public Types

typedef std::map< std::string,
LoadedSpatialData > 
LoadedSpatialDataList
typedef std::map< std::string,
TransformationSet > 
TransformationResourceList

Public Member Functions

gec::SpatialData * GetLoadedSpatialDataListEntry (const std::string &dmid, DisplayDescription *displayDescription)
unsigned long GetMemoryUsage ()
bool LoadSpatialData (const std::string &datasetID, const std::string &dataID, DisplayDescription *displayDescription)
 Load spatial data into memory and add to loadedSpatialDataList.
bool LoadSpatialData (const std::string &dmid, DisplayDescription *displayDescription)
 Load spatial data into memory and add to loadedSpatialDataList.
bool LoadTransformation (const std::string &source, const std::string &target, const std::string &algorithmID, DisplayDescription *displayDescription)
 Load transformation into memory and add to loadedSpatialDataList.
bool LoadTransformation (const std::string &dmid, DisplayDescription *displayDescription)
 Load transformation into memory and add to loadedSpatialDataList.
 NIREPDataManager (void)
 Default constructor.
bool ReadSpatialDataResourceFile (const std::string &filename)
 Read image resource file to populate the spatialDataResourceList.
bool ReadTransformationResourceFile (const std::string &filename)
 Read transformation resource file to populate the transformationResourceList.
bool ReleaseLoadedSpatialDataListEntry (const std::string &dmid)
 Release spatial data dependency (i.e. reduce reference count)
void SetInterface (Interface *I)
void SetLoadedSpatialDataListEntry (const std::string &dmid, gec::SpatialData *data)
 ~NIREPDataManager (void)
 Destructor.

Detailed Description

The Data Manager is responsible for managing all image and metric data within NIREP. This includes responsibility for handling queries from other components for access to various types of data, as well as memory management functions such as dynamic movement of images between memory and disk and compression/decompression of data. The data manager is designed to retain the results of computationally intensive operations on data elements in order to avoid re-computation of these operations to satisfy future requests. There is only one data manager per NIREP session. Its creation is initiated by the user via the Interface. It is also responsible for handling queries into the database which might involve other components asking for descriptive information associated with various data elements such as date when an element was generated, the process that generated it, any associated identifiers, etc. It is also responsible for supplying handles to the requested data to the various components that request them. It also is responsible for managing metric data that contains information pertaining to evaluation or comparisons of algorithms over data elements. Since some of the transformation information may be available in compressed form, the data manager also compresses or decompresses this information for use when speed is required, or when storage space is needed. The data manager is also responsible for storing data that might have been generated by the user as a result of various applications of operations upon the various data elements available in the database. This storage also might require the exact sequence of operations involved leading to the creation of the data. The data manager also manages the Display Manager state.


Member Typedef Documentation

typedef std::map<std::string, LoadedSpatialData> NIREPDataManager::LoadedSpatialDataList
typedef std::map<std::string, TransformationSet> NIREPDataManager::TransformationResourceList

Transformation resource list (top level resource table) attributes [algorithm name, transformation set]


Constructor & Destructor Documentation

NIREPDataManager::NIREPDataManager ( void  )

Default constructor.

NIREPDataManager::~NIREPDataManager ( void  )

Destructor.


Member Function Documentation

gec::SpatialData * NIREPDataManager::GetLoadedSpatialDataListEntry ( const std::string &  dmid,
DisplayDescription displayDescription 
)

Fetch spatial data with the given data ID Searches the loadedSpatialDataList for requested data ID It uses the spatialDataResourceList and to resolve requested spatial data file location (if not generated during runtime)

Programmer: Paul Song Joo Hyun Date: 04/06/2009 Function: This function will return the data pointer for given data manager ID; if the data doesn't exist, it will check to see if the dmid is atomic (i.e. a 'record' command) and will begin loading of data Copyright: The University of Iowa Inputs: dmid - the data manager ID of the requested data Outputs: Data pointer to requested data

unsigned long NIREPDataManager::GetMemoryUsage ( )
bool NIREPDataManager::LoadSpatialData ( const std::string &  datasetID,
const std::string &  dataID,
DisplayDescription displayDescription 
)

Load spatial data into memory and add to loadedSpatialDataList.

Load spatial data from disk using information from the display description.

Programmer: Gary E. Christensen and Paul Song Date: 7/2/2010

bool NIREPDataManager::LoadSpatialData ( const std::string &  dmid,
DisplayDescription displayDescription 
)

Load spatial data into memory and add to loadedSpatialDataList.

Load spatial data from disk using information from the display description.

Programmer: Gary E. Christensen and Paul Song Date: 7/2/2010

bool NIREPDataManager::LoadTransformation ( const std::string &  source,
const std::string &  target,
const std::string &  transformation,
DisplayDescription displayDescription 
)

Load transformation into memory and add to loadedSpatialDataList.

Load transformations from disk using information from the display description.

Programmer: Gary E. Christensen and Paul Song Date: 7/2/2010

bool NIREPDataManager::LoadTransformation ( const std::string &  dmid,
DisplayDescription displayDescription 
)

Load transformation into memory and add to loadedSpatialDataList.

Load transformations from disk using information from the display description.

Programmer: Gary E. Christensen and Paul Song Date: 7/2/2010

bool NIREPDataManager::ReadSpatialDataResourceFile ( const std::string &  filename)

Read image resource file to populate the spatialDataResourceList.

bool NIREPDataManager::ReadTransformationResourceFile ( const std::string &  filename)

Read transformation resource file to populate the transformationResourceList.

bool NIREPDataManager::ReleaseLoadedSpatialDataListEntry ( const std::string &  dmid)

Release spatial data dependency (i.e. reduce reference count)

Programmer: Paul Song Joo Hyun Date: 04/06/2009 Function: Releases a data entry with the given data manager ID from the database Copyright: The University of Iowa Inputs: dmid - the data manager ID to delete Outputs: Returns true of delete successful; returns false otherwise

void NIREPDataManager::SetInterface ( Interface I) [inline]
void NIREPDataManager::SetLoadedSpatialDataListEntry ( const std::string &  dmid,
gec::SpatialData *  data 
)

Add loaded/generated spatial data to loadedSpatialDataList dmid = data manager id

Programmer: Paul Song Joo Hyun Date: 04/06/2009 Function: This function will add the spatial data that is in memory to the data manager with the data manager ID (same as taskID in Evaluator) as the key Copyright: The University of Iowa Inputs: dmid - the unique ID identifying the data to be stored data - the data to be stored Outputs: None

 All Classes Functions Variables Typedefs Enumerations Enumerator