17 #ifndef __igstkBinaryData_h
18 #define __igstkBinaryData_h
21 #include <itkObject.h>
60 void SetSize(
unsigned int size);
72 void CopyFrom(
unsigned char* inputBegin,
unsigned int inputLength);
75 void CopyTo(
unsigned char* output)
const;
78 void Append(
unsigned char byte);
81 void Append(
const unsigned char* inputBegin,
unsigned int inputLength);
96 unsigned char operator[](
const unsigned int index )
const;
99 unsigned char&
operator[](
const unsigned int index );
103 operator std::string()
const;
106 void Print(std::ostream& os, itk::Indent indent)
const;
109 static void Encode( std::string& output,
const unsigned char *data,
113 bool Decode(
const std::string& asciiString );
118 void PrintHeader(std::ostream& os, itk::Indent indent)
const;
122 itk::Indent itkNotUsed(indent))
const;
125 virtual void PrintSelf( std::ostream& os, itk::Indent indent )
const;
static void Encode(std::string &output, const unsigned char *data, unsigned int size)
Encode method encodes binary data to ASCII string in std::string.
void Print(std::ostream &os, itk::Indent indent) const
Method for printing the member variables of this class to an ostream.
virtual void PrintSelf(std::ostream &os, itk::Indent indent) const
Print the object information in a stream.
std::ostream & operator<<(std::ostream &os, const igstk::AffineTransform &o)
void SetSize(unsigned int size)
SetSize method resizes/allocates memory.
void Append(unsigned char byte)
Append a byte.
std::vector< unsigned char > ContainerType
Data container type definition.
const BinaryData & operator=(const BinaryData &inputBinaryData)
Assign the values of one BinaryData to another.
ContainerType & GetData()
Get a data container.
void CopyFrom(unsigned char *inputBegin, unsigned int inputLength)
Copy data from an array.
virtual ~BinaryData()
Destructor.
bool operator==(const BinaryData &inputBinaryData) const
operator== redefinition
bool operator!=(const BinaryData &inputBinaryData) const
operator!= redefinition
void PrintTrailer(std::ostream &itkNotUsed(os), itk::Indent itkNotUsed(indent)) const
Method for printing the trailer to an ostream.
const ContainerType & GetData() const
Get a data container (returns constant)
bool Decode(const std::string &asciiString)
Decode method decodes encoded ASCII string to binary data.
BinaryData representing a binary data chunk.
void PrintHeader(std::ostream &os, itk::Indent indent) const
Method for printing the header to an ostream.
unsigned int GetSize() const
GetSize method returns the size of data.
unsigned char operator[](const unsigned int index) const
operator[] redefinition
void CopyTo(unsigned char *output) const
Copy data into an array.
bool operator<(const BinaryData &inputBinaryData) const
operator< redefinition