#include <itkAIMHeaderIO.h>
Definition at line 29 of file itkAIMHeaderIO.h.
◆ ~AIMHeaderIO()
| itk::AIMHeaderIO::~AIMHeaderIO |
( |
| ) |
|
|
override |
◆ ReadHeader()
| unsigned long itk::AIMHeaderIO::ReadHeader |
( |
std::ifstream & | infile | ) |
|
|
overridevirtual |
Read the header from an infile. Fills in the m_HeaderData structure with the header information.
- Parameters
-
| infile | The input file stream to read the header from. |
- Exceptions
-
| std::runtime_error | if the file cannot be opened or read. |
- Note
- Overrides base class virtual method
Reimplemented from itk::ScancoHeaderIO.
◆ ReadImgStructHeader() [1/2]
| void itk::AIMHeaderIO::ReadImgStructHeader |
( |
AIMV020StructHeader * | headerData | ) |
|
|
protected |
Read the AIM v020 image structure header from a data structure.
- Parameters
-
| headerData | pointer to structure containing image structure header |
◆ ReadImgStructHeader() [2/2]
| void itk::AIMHeaderIO::ReadImgStructHeader |
( |
AIMV030StructHeader * | headerData | ) |
|
|
protected |
Read the AIM v030 image structure header from a data structure.
- Parameters
-
| headerData | pointer to structure containing image structure header |
◆ ReadPreHeader()
| int itk::AIMHeaderIO::ReadPreHeader |
( |
std::ifstream & | file, |
|
|
vcl_size_t | offset = 0 ) |
|
protected |
Read the AIM pre-header from the file stream.
- Parameters
-
| file | The input file stream to read the header from. |
| offset | The offset in the file to start reading from. |
- Note
- m_IntSize is used to determine the size of integers in the pre-header, and should be set appropriately before calling
- Returns
- -1 on failure, 0 on success.
◆ ReadProcessingLog()
| vcl_size_t itk::AIMHeaderIO::ReadProcessingLog |
( |
std::ifstream & | infile, |
|
|
vcl_size_t | offset, |
|
|
vcl_size_t | length ) |
|
protected |
Read the AIM processing log from the file stream.
- Parameters
-
| infile | The input file stream to read the header from. |
| length | The length of the processing log to read. |
| offset | The offset in the file to start reading from. |
- Returns
- size of the processing log read
◆ ScancoHeaderIO()
| itk::ScancoHeaderIO::ScancoHeaderIO |
( |
itkScancoHeaderData * | headerData, |
|
|
std::string | filename = "" ) |
Constructor that initializes the header data pointer. If the pointer is null, the object will fail to be created and will throw an exception.
- Parameters
-
| headerData | Pointer to the location to store the header data |
- Note
- m_RawHeader will be overwritten on read and/or write
- Parameters
-
| filename | optional filename to read the header from or write to. If no filename is provided, it can be specified later using ReadHeader or WriteHeader |
- See also
- ReadHeader(std::string filename) and WriteHeader(std::string filename)
- Exceptions
-
| std::runtime_error | if headerData is null. |
◆ WriteHeader()
| unsigned long itk::AIMHeaderIO::WriteHeader |
( |
std::ofstream & | outfile, |
|
|
unsigned long | imageSize ) |
|
overridevirtual |
Write the header to an open file stream.
- Parameters
-
| outfile | Pointer to an open std::ofstream where the header will be written. |
| imageSize | size of the image that will be written after the header, in bytes |
- Exceptions
-
| std::runtime_error | if headerData is null. |
- Note
- overrides base class virtual method
- Returns
- number of bytes written to the file.
Reimplemented from itk::ScancoHeaderIO.
◆ WritePreHeader()
Write the image pre-header to a file
- Parameters
-
| outfile | The output file stream to write the pre-header to |
| imageSize | size of the image that will be written after the header, in bytes |
| version | The AIM file version to write (default is AIM_020) |
- Returns
- number of bytes written to the file
- Note
- pre-header is written into the current file pointer of the outfile stream
-
pre-header blocks are written based on imageSize, m_ImgStructSize, and m_ProcessingLogSize, which should be set accordingly
References itk::ScancoHeaderIO::AIM_020.
◆ WriteProcessingLog()
| std::string itk::AIMHeaderIO::WriteProcessingLog |
( |
| ) |
|
|
protected |
Write the processing log to a string.
- Returns
- std::string containing the processing log populated with the header data
◆ WriteStructHeaderV020()
| AIMV020StructHeader itk::AIMHeaderIO::WriteStructHeaderV020 |
( |
| ) |
|
|
protected |
Write the image structure header to an AIM v020 data structure
- Returns
- AIMV020StructHeader structure filled with encoded header data
◆ WriteStructHeaderV030()
| AIMV030StructHeader itk::AIMHeaderIO::WriteStructHeaderV030 |
( |
| ) |
|
|
protected |
Write the image structure header to an AIM v030 data structure
- Returns
- AIMV030StructHeader structure filled with encoded header data
◆ m_ImgStructSize
| vcl_size_t itk::AIMHeaderIO::m_ImgStructSize { 0 } |
|
private |
◆ m_IntSize
| unsigned int itk::AIMHeaderIO::m_IntSize { 4 } |
|
private |
◆ m_PreHeaderSize
| vcl_size_t itk::AIMHeaderIO::m_PreHeaderSize { 0 } |
|
private |
Header Size = m_PreHeaderSize + m_ImgStructSize + m_ProcessingLogSize
Definition at line 121 of file itkAIMHeaderIO.h.
◆ m_ProcessingLogSize
| vcl_size_t itk::AIMHeaderIO::m_ProcessingLogSize { 0 } |
|
private |
The documentation for this class was generated from the following file: