#include <vil_dicom_header.h>
This class reads and writes the header section of a dicom file, determining the type and storing the information in a dicom structure.
Definition at line 463 of file vil_dicom_header.h.
Public Member Functions | |
| vil_dicom_header_format () | |
| ~vil_dicom_header_format () | |
| bool | isDicomFormat (vil_stream &) |
| True if it is known DICOM format. | |
| vil_dicom_header_info | readHeader (vil_stream &fs) |
| Read the dicom header into a header struct. | |
| vil_dicom_header_info | lastHeader (void) |
| Method to return the last struct of header info set. | |
| bool | headerValid (void) |
| Method to indicate if the header info held is valid or not. | |
| vil_dicom_header_endian | systemEndian (void) |
| Return the current system endian. | |
| vil_dicom_header_endian | fileEndian (void) |
| Return the endian of the header being read. | |
| vil_dicom_header_image_type | imageType (void) |
| Return any encapsulated image type. | |
Private Member Functions | |
| vil_dicom_header_type | determineFileType (vil_stream &fs) |
| Method to determine the file type. | |
| void | readHeaderElements (vil_stream &fs) |
| Method to read the elements from the header. | |
| void | readIdentifyingElements (short element, int dblock_size, vil_stream &fs) |
| Method to read the identifying group's details. | |
| void | readPatientElements (short element, int dblock_size, vil_stream &fs) |
| Method to read the patient details. | |
| void | readAcquisitionElements (short element, int dblock_size, vil_stream &fs) |
| Method to read the acquisition group's details. | |
| void | readRelationshipElements (short element, int dblock_size, vil_stream &fs) |
| Method to read the relationship group's details. | |
| void | readImageElements (short element, int dblock_size, vil_stream &fs) |
| Method to read the image group's details. | |
| void | readDelimiterElements (short element, int dblock_size, vil_stream &fs) |
| Method to read the delimiter group's details. | |
| bool | convertValueRepresentation (unsigned int &dblock_size, vil_stream &ifs) |
| Method to convert the Value Representation (VR) (if it exists). | |
| bool | pixelDataFound (short group, short element) |
| Method to determine whether or not the actual pixel data has been reached. | |
| void | clearInfo (void) |
| vil_dicom_header_endian | calculateEndian (void) |
| Work out whether the current architecture is big or little endian. | |
| vil_dicom_header_endian | determineMetaInfo (vil_stream &fs) |
| Initialise all the necessary meta-file stuff. | |
| vxl_uint_16 | shortSwap (vxl_uint_16 short_in) |
| Method to byte swap an unsigned short int if necessary. | |
| vxl_uint_32 | intSwap (vxl_uint_32 int_in) |
| Method to byte swap an unsigned int if necessary. | |
| void | charSwap (char *char_in, int val_size) |
| Method to swap a number inside a char array. | |
Private Attributes | |
| vil_dicom_header_info | last_read_ |
| Holds the info from the last header read. | |
| bool | info_valid_ |
| TRUE if the header info is valid (i.e. has been read) otherwise FALSE. | |
| vil_dicom_header_endian | endian_ |
| A variable to hold the discovered architecture endian. | |
| vil_dicom_header_endian | file_endian_ |
| A variable to hold the current header file's endian. | |
| vil_dicom_header_image_type | image_type_ |
| A variable to hole the current encapsulate file type (if any). | |
|
|
|
|
|
|
|
|
Work out whether the current architecture is big or little endian.
|
|
||||||||||||
|
Method to swap a number inside a char array.
|
|
|
|
|
||||||||||||
|
Method to convert the Value Representation (VR) (if it exists).
|
|
|
Method to determine the file type.
|
|
|
Initialise all the necessary meta-file stuff.
|
|
|
Return the endian of the header being read.
|
|
|
Method to indicate if the header info held is valid or not.
|
|
|
Return any encapsulated image type.
|
|
|
Method to byte swap an unsigned int if necessary.
|
|
|
True if it is known DICOM format.
|
|
|
Method to return the last struct of header info set. The class holds a dicom header info struct containing the info from the last dicom file read.
|
|
||||||||||||
|
Method to determine whether or not the actual pixel data has been reached.
|
|
||||||||||||||||
|
Method to read the acquisition group's details. Fills the acquisition details in the last_read_ structure from the file header
|
|
||||||||||||||||
|
Method to read the delimiter group's details. Certain field in the delimiter group have no data block, and so should not be skipped. This method takes the appropriate action - to skip or not to skip
|
|
|
Read the dicom header into a header struct. Reads the header section of the dicom file and stores the result in a header struct, which it returns. When finished, the file stream should be pointing at the start of the image data
|
|
|
Method to read the elements from the header. This method fills the last_read_ header structure with the necessary fields
|
|
||||||||||||||||
|
Method to read the identifying group's details. Fills the identifying details in the last_read_ structure from the file header
|
|
||||||||||||||||
|
Method to read the image group's details. Fills the image details in the last_read_ structure from the file header
|
|
||||||||||||||||
|
Method to read the patient details. Fills the patient details in the last_read_ structure from the file header
|
|
||||||||||||||||
|
Method to read the relationship group's details. Fills the relationship details in the last_read_ structure from the file header
|
|
|
Method to byte swap an unsigned short int if necessary.
|
|
|
Return the current system endian.
|
|
|
A variable to hold the discovered architecture endian.
Definition at line 691 of file vil_dicom_header.h. |
|
|
A variable to hold the current header file's endian.
Definition at line 696 of file vil_dicom_header.h. |
|
|
A variable to hole the current encapsulate file type (if any).
Definition at line 701 of file vil_dicom_header.h. |
|
|
TRUE if the header info is valid (i.e. has been read) otherwise FALSE.
Definition at line 686 of file vil_dicom_header.h. |
|
|
Holds the info from the last header read.
Definition at line 681 of file vil_dicom_header.h. |
1.4.4