NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Public Types | Public Member Functions | List of all members
niftk::LookupTableManager Class Reference

Class to manage access to LookupTableContainers. More...

Public Types

typedef std::unordered_map
< std::string, const
LookupTableContainer * > 
LookupTableMapType
 

Public Member Functions

 LookupTableManager ()
 
virtual ~LookupTableManager ()
 
unsigned int GetNumberOfLookupTables ()
 
const LookupTableContainerGetLookupTableContainer (const QString &name)
 
std::vector< QString > GetTableNames ()
 Returns the list of names in the map. More...
 
void AddLookupTableContainer (const LookupTableContainer *container)
 Add the given LookupTableContainer to the set of containers. More...
 
void ReplaceLookupTableContainer (const LookupTableContainer *container, const QString &name)
 Replace the LookupTableContainer with name with the given LookupTableContainer. More...
 
bool CheckName (const QString &name)
 

Detailed Description

Class to manage access to LookupTableContainers.

Each LookupTableContainers contains 1 vtkLookupTable. These are loaded from disc when the LookupTableManager is created. This manager class takes care of providing copies of the lookup tables. So, when the client calls CloneLookupTable(), the client owns the provided vtkLookupTable, and should delete it when done.

Member Typedef Documentation

Constructor & Destructor Documentation

niftk::LookupTableManager::LookupTableManager ( )

No-arg constructor.

niftk::LookupTableManager::~LookupTableManager ( )
virtual

Destructor, to get rid of all lookup tables.

Member Function Documentation

void niftk::LookupTableManager::AddLookupTableContainer ( const LookupTableContainer container)

Add the given LookupTableContainer to the set of containers.

bool niftk::LookupTableManager::CheckName ( const QString &  name)

Checks that name exists within the containers map.

const LookupTableContainer * niftk::LookupTableManager::GetLookupTableContainer ( const QString &  name)

Returns a pointer to the nth lookup table container in the list, or NULL if index < 0, or index >= GetNumberOfLookupTables().

unsigned int niftk::LookupTableManager::GetNumberOfLookupTables ( )

Gets the total number of lookup tables loaded.

std::vector< QString > niftk::LookupTableManager::GetTableNames ( )

Returns the list of names in the map.

void niftk::LookupTableManager::ReplaceLookupTableContainer ( const LookupTableContainer container,
const QString &  name 
)

Replace the LookupTableContainer with name with the given LookupTableContainer.


The documentation for this class was generated from the following files: