|
Bsoft
1.9
Bernard's software package
|
Functions to check and convert datatypes. More...
Go to the source code of this file.
Functions | |
| unsigned long | gettypesize (DataType type) |
| Get the size of a datatype. More... | |
| DataType | getdatatype (char letter) |
| Get the data type indicated by a single letter code. More... | |
| int | set_value_with_datatype (char *ptr, double value, DataType datatype) |
| Set a pointer to a value with a given data type. More... | |
Variables | |
| int | verbose |
Functions to check and convert datatypes.
Definition in file datatypes.cpp.
| DataType getdatatype | ( | char | letter | ) |
Get the data type indicated by a single letter code.
This function is used in optional command-line arguments to indicate a new data type for an image.
| letter | letter indicating data type. |
Definition at line 52 of file datatypes.cpp.
| unsigned long gettypesize | ( | DataType | type | ) |
Get the size of a datatype.
This function is used for calculating image data sizes for allocating memory and reading the data.
| type | data type (defined in rwimg.h). |
Definition at line 25 of file datatypes.cpp.
| int set_value_with_datatype | ( | char * | ptr, |
| double | value, | ||
| DataType | datatype | ||
| ) |
Set a pointer to a value with a given data type.
A value is inserted into a given location with the given data type. The size of the allocated memory is channels*typesize.
| *ptr | pointer to location. |
| value | the value. |
| datatype | data type (defined in rwimg.h). |
Definition at line 89 of file datatypes.cpp.
| int verbose |