fw4spl
fwGdcmIO::helper::SegmentedPropertyRegistry Class Reference

Registry of Segment Properties. This class defines a registry which links a structure type to an entry. Each entry is composed of 5 attributes : More...

#include <SegmentedPropertyRegistry.hpp>

Public Types

typedef std::array< std::string, 5 > EntryType
 Entry containing the 5 attributes of a structure type.
 

Public Member Functions

FWGDCMIO_API SegmentedPropertyRegistry ()
 Constructor.
 
FWGDCMIO_API bool readSegmentedPropertyRegistryFile (const ::boost::filesystem::path &filepath, bool omitFirstLine=false, const std::shared_ptr< ::fwLog::Logger > &logger=0)
 Read an extract registry values from a CSV file Each lines shall contain at least 6 elements : More...
 
FWGDCMIO_API bool readSegmentedPropertyRegistryFile (std::istream &csvStream, bool omitFirstLine=false, const std::shared_ptr< ::fwLog::Logger > &logger=0)
 Read an extract registry values from a CSV stream Each lines shall contain at least 6 elements : More...
 
FWGDCMIO_API bool empty () const
 Returns whether the registry is empty or not.
 
FWGDCMIO_API std::size_t count () const
 Returns the number of entries.
 
FWGDCMIO_API void clear ()
 Clear the registry.
 
FWGDCMIO_API bool hasEntry (const std::string &structureType) const
 Check if there is an entry for the corresponding structure type. More...
 
FWGDCMIO_API EntryType getEntry (const std::string &structureType) const
 Returns matching entry for the corresponding structure type. More...
 
FWGDCMIO_API std::string getStructureType (const std::string &propertyType, const std::string &propertyCategory, const std::string &propertyTypeModifiers, const std::string &anatomicRegion, const std::string &anatomicRegionModifiers) const
 Returns the structure type associated to the attribute list. If no match is found, it returns an empty string. More...
 
FWGDCMIO_API std::string getPropertyType (const std::string &structureType) const
 Getters for entry's attributes. More...
 
FWGDCMIO_API std::string getPropertyCategory (const std::string &structureType) const
 Getters for entry's attributes. More...
 
FWGDCMIO_API std::string getPropertyTypeModifiers (const std::string &structureType) const
 Getters for entry's attributes. More...
 
FWGDCMIO_API std::string getAnatomicRegion (const std::string &structureType) const
 Getters for entry's attributes. More...
 
FWGDCMIO_API std::string getAnatomicRegionModifiers (const std::string &structureType) const
 Getters for entry's attributes. More...
 

Detailed Description

Registry of Segment Properties. This class defines a registry which links a structure type to an entry. Each entry is composed of 5 attributes :

  • Property Type
  • Property Category
  • Property Type Modifiers
  • Anatomic Region
  • Anatomic Region Modifiers

Definition at line 40 of file SegmentedPropertyRegistry.hpp.

Member Function Documentation

std::string fwGdcmIO::helper::SegmentedPropertyRegistry::getAnatomicRegion ( const std::string &  structureType) const

Getters for entry's attributes.

Parameters
[in]structureTypeStructure type

Definition at line 256 of file SegmentedPropertyRegistry.cpp.

std::string fwGdcmIO::helper::SegmentedPropertyRegistry::getAnatomicRegionModifiers ( const std::string &  structureType) const

Getters for entry's attributes.

Parameters
[in]structureTypeStructure type

Definition at line 263 of file SegmentedPropertyRegistry.cpp.

SegmentedPropertyRegistry::EntryType fwGdcmIO::helper::SegmentedPropertyRegistry::getEntry ( const std::string &  structureType) const

Returns matching entry for the corresponding structure type.

Parameters
[in]structureTypeStructure type

Definition at line 213 of file SegmentedPropertyRegistry.cpp.

std::string fwGdcmIO::helper::SegmentedPropertyRegistry::getPropertyCategory ( const std::string &  structureType) const

Getters for entry's attributes.

Parameters
[in]structureTypeStructure type

Definition at line 242 of file SegmentedPropertyRegistry.cpp.

std::string fwGdcmIO::helper::SegmentedPropertyRegistry::getPropertyType ( const std::string &  structureType) const

Getters for entry's attributes.

Parameters
[in]structureTypeStructure type

Definition at line 235 of file SegmentedPropertyRegistry.cpp.

std::string fwGdcmIO::helper::SegmentedPropertyRegistry::getPropertyTypeModifiers ( const std::string &  structureType) const

Getters for entry's attributes.

Parameters
[in]structureTypeStructure type

Definition at line 249 of file SegmentedPropertyRegistry.cpp.

std::string fwGdcmIO::helper::SegmentedPropertyRegistry::getStructureType ( const std::string &  propertyType,
const std::string &  propertyCategory,
const std::string &  propertyTypeModifiers,
const std::string &  anatomicRegion,
const std::string &  anatomicRegionModifiers 
) const

Returns the structure type associated to the attribute list. If no match is found, it returns an empty string.

Parameters
[in]propertyTypeProperty Type
[in]propertyCategoryProperty Category
[in]propertyTypeModifiersProperty Modifiers
[in]anatomicRegionAnatomic Region
[in]anatomicRegionModifiersAnatomic Region Modifiers

Definition at line 272 of file SegmentedPropertyRegistry.cpp.

bool fwGdcmIO::helper::SegmentedPropertyRegistry::hasEntry ( const std::string &  structureType) const

Check if there is an entry for the corresponding structure type.

Parameters
[in]structureTypeStructure type

Definition at line 206 of file SegmentedPropertyRegistry.cpp.

FWGDCMIO_API bool fwGdcmIO::helper::SegmentedPropertyRegistry::readSegmentedPropertyRegistryFile ( const ::boost::filesystem::path &  filepath,
bool  omitFirstLine = false,
const std::shared_ptr< ::fwLog::Logger > &  logger = 0 
)

Read an extract registry values from a CSV file Each lines shall contain at least 6 elements :

  • Structure Type
  • Property Type (With unique (AAA;BBB;CCC) value) [MANDATORY]
  • Property Category (With unique (AAA;BBB;CCC) value) [MANDATORY]
  • Property Type Modifiers (With one or more (AAA;BBB;CCC) values)
  • Anatomic Region (With unique (AAA;BBB;CCC) value) [MANDATORY]
  • Anatomic Region Modifiers (With one or more (AAA;BBB;CCC) values) Each of those elements shall be separated using the '|' separator
    Parameters
    [in]filepathPath of the CSV file
    [in]omitFirstLineIf set to 'true', the first line of the file is omitted
    [in]loggerLogger used to display errors

Referenced by fwGdcmIO::writer::ie::Surface::loadSegmentedPropertyRegistry(), and SegmentedPropertyRegistry().

+ Here is the caller graph for this function:

FWGDCMIO_API bool fwGdcmIO::helper::SegmentedPropertyRegistry::readSegmentedPropertyRegistryFile ( std::istream &  csvStream,
bool  omitFirstLine = false,
const std::shared_ptr< ::fwLog::Logger > &  logger = 0 
)

Read an extract registry values from a CSV stream Each lines shall contain at least 6 elements :

  • Structure Type
  • Property Type (With unique (AAA;BBB;CCC) value) [MANDATORY]
  • Property Category (With unique (AAA;BBB;CCC) value) [MANDATORY]
  • Property Type Modifiers (With one or more (AAA;BBB;CCC) values)
  • Anatomic Region (With unique (AAA;BBB;CCC) value)
  • Anatomic Region Modifiers (With one or more (AAA;BBB;CCC) values) Each of those elements shall be separated using the '|' separator
    Parameters
    [in]csvStreamCSV stream
    [in]omitFirstLineIf set to 'true', the first line of the file is omitted
    [in]loggerLogger used to display errors

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