MDSTk Libraries  1.1.0
Medical Data Segmentation Toolkit
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
mds::mod Namespace Reference

Namespaces

namespace  BinarySerializer
namespace  console
 

Namespace containing constants used by the CConsole class.


namespace  module
 

Namespace containing constants used by the CModule class.


namespace  Serializer
namespace  view
 

Namespace containing constants used by the CView class.


Classes

class  CArgv
 Application command line arguments parser. More...
class  CBinarySerializer
 Serializer which encapsulates serialization of data entities and their members via channels. More...
class  CBlockChannel
 Buffered channel organizing data into blocks of predefined size. More...
class  CByteTranspose
 Class providing a simple transposition of lower and higher bytes. More...
class  CChannel
 Base abstract class for all classes implementing channels. More...
class  CChannelCompressor
 Abstract class encapsulating a channel compressor. More...
class  CChannelSerializer
 Base class for all serializers. More...
class  CCompressorFactory
 Channel compressors creation factory. More...
class  CConsole
 Class encapsulating a simple console application. More...
class  CDensityCompressor
 Class providing density data compression. More...
class  CDensityPredictor
 Class providing a simple difference predictor of density data. More...
class  CFileChannel
 I/O by means of reading and writing files. More...
class  CFileChannelU
 I/O by means of reading and writing files with Unicode names. More...
class  CGlobalSignal
 Global signal helpful for distribution of global events within an application. More...
class  CGZipCompressor
 Class providing gzip compression. More...
class  CIStreamChannel
 Buffered channel providing STL-like stream functionality. More...
class  CMemoryChannel
 Simple memory channel that keeps all data in a memory buffer. More...
class  CModule
 Class encapsulating a single MDSTk module. More...
class  CNullChannel
 Null channel that doesn't write or read any data. More...
class  COStreamChannel
 Buffered channel providing STL-like stream functionality. More...
class  CPipeChannel
 Channel via named pipes. More...
class  CPredictorChannel
 Class providing base for compression predictor channels. More...
class  CProgress
 Base class for all other classes able to inform calling processes about progress of a running operation. More...
class  CRawCompressor
 Writes uncompressed data. More...
class  CRLE16Compressor
 Class providing 16-bit RLE compression. More...
class  CRLE8Compressor
 Class providing 8-bit RLE compression. More...
class  CSerializable
 Base class for all serializable objects further called data entities. More...
class  CSerializationTraits
 Template providing serialization specific information. More...
class  CSharedMemChannel
 Channel over shared memory. More...
class  CSHMSerializer
 Fast serialization of data entities and their members over shared memory. More...
class  CSignal
 Class provides simple communication and data transfer mechanism between different classes. More...
class  CSignalConnection
 Unique signal connection identifier. More...
class  CStdChannel
 Channel implemented via reading stdin and writing stdout. More...
class  CView
 The class encapsulating input and visualization functions. More...

Typedefs

typedef CArgv::tSmartPtr CArgvPtr
 Smart pointer to arguments parser.
typedef
CBinarySerializer::tSmartPtr 
CBinarySerializerPtr
 Smart pointer to binary serializer.
typedef CBlockChannel::tSmartPtr CBlockChannelPtr
 Smart pointer to channel BlockChannel.
typedef
CChannelCompressor::tSmartPtr 
CChannelCompressorPtr
 Smart pointer to channel compressor.
typedef CChannel::tSmartPtr CChannelPtr
 Smart pointer to channel.
typedef CConsole::tSmartPtr CConsolePtr
 Smart pointer to console.
typedef CSHMSerializer::tSmartPtr CCSHMSerializerPtr
 Smart pointer to SHM serializer.
typedef
CDensityCompressor::tSmartPtr 
CDensityCompressorPtr
 Smart pointer to density data compressor.
typedef CFileChannel::tSmartPtr CFileChannelPtr
 Smart pointer to file channel.
typedef CFileChannelU::tSmartPtr CFileChannelUPtr
 Smart pointer to file channel.
typedef CGZipCompressor::tSmartPtr CGZipCompressorPtr
 Smart pointer to GZip compression channel.
typedef CIStreamChannel::tSmartPtr CIStreamChannelPtr
 Smart pointer to channel CIStreamChannel.
typedef CMemoryChannel::tSmartPtr CMemoryChannelPtr
 Smart pointer to memory channel.
typedef CModule::tSmartPtr CModulePtr
 Smart pointer to module.
typedef CNullChannel::tSmartPtr CNullChannelPtr
 Smart pointer to null channel.
typedef COStreamChannel::tSmartPtr COStreamChannelPtr
 Smart pointer to channel COStreamChannel.
typedef CPipeChannel::tSmartPtr CPipeChannelPtr
 Smart pointer to pipe channel.
typedef
CPredictorChannel::tSmartPtr 
CPredictorChannelPtr
 Smart pointer to compression predictor channel.
typedef CRawCompressor::tSmartPtr CRawCompressorPtr
 Smart pointer compressor.
typedef CRLE16Compressor::tSmartPtr CRLE16CompressorPtr
 Smart pointer to the 16-bit RLE compressor.
typedef CRLE8Compressor::tSmartPtr CRLE8CompressorPtr
 Smart pointer to 8-bit RLE compressor.
typedef
CSharedMemChannel::tSmartPtr 
CSharedMemChannelPtr
 Smart pointer to shared memory channel.
typedef CStdChannel::tSmartPtr CStdChannelPtr
 Smart pointer to stdin/stdout channel.
typedef CView::tSmartPtr CViewPtr
 Smart pointer to view.
typedef CSignalConnection tSignalConnection
 Unique signal connection identifier.

Enumerations

enum  EChannelCompression {
  CC_RAW = 0, CC_RLE8 = 1, CC_RLE16 = 2, CC_GZIP = 3,
  CC_DENSITY = 8
}
 Available basic channel compression methods. More...
enum  EChannelMedium {
  CH_NULL = 0, CH_STDIO = 1, CH_FILE, CH_PIPE,
  CH_SHM, CH_TCP, CH_MEM
}
 Channel transmission medium. More...
enum  EChannelType {
  CH_UNKNOWN = 0, CH_IN = 1 << 0, CH_OUT = 1 << 1, CH_BIDIRECTIONAL = CH_IN | CH_OUT,
  CH_COMPRESSOR = 1 << 2, CH_PREDICTOR = 1 << 3
}
 Channel types. More...
enum  EParserState { ARGV_PARSER_ARGUMENT, ARGV_PARSER_VALUE, ARGV_PARSER_SVALUE, ARGV_PARSER_END }
 Finite automaton (parser) states. More...

Functions

template<typename T >
bool load (T &Object, const std::string &ssFilename, int iFlags=0)
 Reads serializable object from a specified binary file.
 MDS_THREAD_ROUTINE (CConsole::threadRoutine)
template<typename T , class S >
bool read (T &Object, CChannelSerializer< S > &Reader)
 Deserializes a given object.
template<typename T >
bool read (T &Object, CChannel &Channel, int iFlags=0)
 Reads serializable object from a specified input channel.
template<typename T >
bool read (T &Object, CChannel &Channel, CProgress::tProgressFunc &Progress, int iFlags=0)
 Reads serializable object from a specified input channel.
template<typename T >
bool save (T &Object, const std::string &ssFilename, int iFlags=0)
 Writes serializable object into a specified binary file.
template<typename T , class S >
bool write (T &Object, CChannelSerializer< S > &Writer)
 Serializes a given object.
template<typename T >
bool write (T &Object, CChannel &Channel, int iFlags=0)
 Writes serializable object into a given channel.
template<typename T >
bool write (T &Object, CChannel &Channel, CProgress::tProgressFunc &Progress, int iFlags=0)
 Writes serializable object into a given channel.

Variables

const unsigned CH_CONNECTION_TIMEOUT = 15000
 Timeout used for connection establishing.
const std::string CH_FILE_TEXT = "file"
const mds::sys::tUInt32 CH_MAGIC = 0x5a53
 Data entity magic number.
const std::string CH_NULL_TEXT = "null"
 Channel medium (textual form)
const std::string CH_PIPE_TEXT = "pipe"
const std::string CH_SHM_TEXT = "shm"
const std::string CH_STDIO_TEXT = "stdio"
const unsigned CH_WAIT_TIMEOUT = 1000
 Timeout used for waiting for data.

Typedef Documentation

typedef CArgv::tSmartPtr mds::mod::CArgvPtr

Smart pointer to arguments parser.

typedef CBinarySerializer::tSmartPtr mds::mod::CBinarySerializerPtr

Smart pointer to binary serializer.

typedef CBlockChannel::tSmartPtr mds::mod::CBlockChannelPtr

Smart pointer to channel BlockChannel.

typedef CChannelCompressor::tSmartPtr mds::mod::CChannelCompressorPtr

Smart pointer to channel compressor.

typedef CChannel::tSmartPtr mds::mod::CChannelPtr

Smart pointer to channel.

typedef CConsole::tSmartPtr mds::mod::CConsolePtr

Smart pointer to console.

typedef CSHMSerializer::tSmartPtr mds::mod::CCSHMSerializerPtr

Smart pointer to SHM serializer.

typedef CDensityCompressor::tSmartPtr mds::mod::CDensityCompressorPtr

Smart pointer to density data compressor.

typedef CFileChannel::tSmartPtr mds::mod::CFileChannelPtr

Smart pointer to file channel.

typedef CFileChannelU::tSmartPtr mds::mod::CFileChannelUPtr

Smart pointer to file channel.

typedef CGZipCompressor::tSmartPtr mds::mod::CGZipCompressorPtr

Smart pointer to GZip compression channel.

typedef CIStreamChannel::tSmartPtr mds::mod::CIStreamChannelPtr

Smart pointer to channel CIStreamChannel.

typedef CMemoryChannel::tSmartPtr mds::mod::CMemoryChannelPtr

Smart pointer to memory channel.

typedef CModule::tSmartPtr mds::mod::CModulePtr

Smart pointer to module.

typedef CNullChannel::tSmartPtr mds::mod::CNullChannelPtr

Smart pointer to null channel.

typedef COStreamChannel::tSmartPtr mds::mod::COStreamChannelPtr

Smart pointer to channel COStreamChannel.

typedef CPipeChannel::tSmartPtr mds::mod::CPipeChannelPtr

Smart pointer to pipe channel.

typedef CPredictorChannel::tSmartPtr mds::mod::CPredictorChannelPtr

Smart pointer to compression predictor channel.

typedef CRawCompressor::tSmartPtr mds::mod::CRawCompressorPtr

Smart pointer compressor.

typedef CRLE16Compressor::tSmartPtr mds::mod::CRLE16CompressorPtr

Smart pointer to the 16-bit RLE compressor.

typedef CRLE8Compressor::tSmartPtr mds::mod::CRLE8CompressorPtr

Smart pointer to 8-bit RLE compressor.

typedef CSharedMemChannel::tSmartPtr mds::mod::CSharedMemChannelPtr

Smart pointer to shared memory channel.

typedef CStdChannel::tSmartPtr mds::mod::CStdChannelPtr

Smart pointer to stdin/stdout channel.

typedef CView::tSmartPtr mds::mod::CViewPtr

Smart pointer to view.

Unique signal connection identifier.


Enumeration Type Documentation

Available basic channel compression methods.

Enumerator:
CC_RAW 

Raw/uncompressed data.

CC_RLE8 

8-bit RLE compression.

CC_RLE16 

16-bit RLE compression.

CC_GZIP 

gzip (zlib) compression.

CC_DENSITY 

bzip2 compression.

Special compression of density data.

Channel transmission medium.

Enumerator:
CH_NULL 

Null channel.

CH_STDIO 

Channel via stdin and stdout.

CH_FILE 

Channel implemented over files.

CH_PIPE 

Channel using named pipes.

CH_SHM 

Channel over a shared memory.

CH_TCP 

Communication over network (not yet implemented).

CH_MEM 

Channel over a memory buffer.

Channel types.

Usually, the listed types cannot be combined together, channel can be either input or output. However, there are some bidirectional channels which can be opened in both directions. See the comments.

Enumerator:
CH_UNKNOWN 

Unknown channel.

CH_IN 

Input channel.

CH_OUT 

Output channel.

CH_BIDIRECTIONAL 

Bidirectional channel.

CH_COMPRESSOR 

Channel compressor.

CH_PREDICTOR 

Channel data predictor.

Finite automaton (parser) states.

Enumerator:
ARGV_PARSER_ARGUMENT 
ARGV_PARSER_VALUE 
ARGV_PARSER_SVALUE 
ARGV_PARSER_END 

Function Documentation

template<typename T >
bool mds::mod::load ( T &  Object,
const std::string &  ssFilename,
int  iFlags = 0 
)

Reads serializable object from a specified binary file.

  • Creates serializer with respect to the channel type.
  • Returns false on failure.
mds::mod::MDS_THREAD_ROUTINE ( CConsole::threadRoutine  )
template<typename T , class S >
bool mds::mod::read ( T &  Object,
CChannelSerializer< S > &  Reader 
)

Deserializes a given object.

  • Returns false on failure.
template<typename T >
bool mds::mod::read ( T &  Object,
CChannel &  Channel,
int  iFlags = 0 
)

Reads serializable object from a specified input channel.

  • Creates serializer with respect to the channel type.
  • Returns false on failure.
template<typename T >
bool mds::mod::read ( T &  Object,
CChannel &  Channel,
CProgress::tProgressFunc &  Progress,
int  iFlags = 0 
)

Reads serializable object from a specified input channel.

  • Creates serializer with respect to the channel type.
  • Returns false on failure.
  • Calls a given functor to notify a waiting process about the progress.
template<typename T >
bool mds::mod::save ( T &  Object,
const std::string &  ssFilename,
int  iFlags = 0 
)

Writes serializable object into a specified binary file.

  • Creates serializer with respect to the channel type and flags.
  • Returns false on failure.
template<typename T , class S >
bool mds::mod::write ( T &  Object,
CChannelSerializer< S > &  Writer 
)

Serializes a given object.

  • Returns false on failure.
template<typename T >
bool mds::mod::write ( T &  Object,
CChannel &  Channel,
int  iFlags = 0 
)

Writes serializable object into a given channel.

  • Creates serializer with respect to the channel type and given flags.
  • Returns false on failure.
template<typename T >
bool mds::mod::write ( T &  Object,
CChannel &  Channel,
CProgress::tProgressFunc &  Progress,
int  iFlags = 0 
)

Writes serializable object into a given channel.

  • Creates serializer with respect to the channel type and given flags.
  • Calls a given functor to notify a waiting process about the progress.
  • Returns false on failure.

Variable Documentation

const unsigned mds::mod::CH_CONNECTION_TIMEOUT = 15000

Timeout used for connection establishing.

const std::string mds::mod::CH_FILE_TEXT = "file"
const mds::sys::tUInt32 mds::mod::CH_MAGIC = 0x5a53

Data entity magic number.

const std::string mds::mod::CH_NULL_TEXT = "null"

Channel medium (textual form)

const std::string mds::mod::CH_PIPE_TEXT = "pipe"
const std::string mds::mod::CH_SHM_TEXT = "shm"
const std::string mds::mod::CH_STDIO_TEXT = "stdio"
const unsigned mds::mod::CH_WAIT_TIMEOUT = 1000

Timeout used for waiting for data.