|
TPCCLIB
|
Extract information from DICOM image. More...
#include "tpcclibConfig.h"#include <stdio.h>#include <stdlib.h>#include <math.h>#include <time.h>#include <string.h>#include "tpcextensions.h"#include "tpcdcm.h"Go to the source code of this file.
Functions | |
| int | dcmImgIsotope (DCMFILE *d, isotope *isot, decaycorrection *dc, const int verbose) |
| int | dcmImgPos (DCMFILE *d, double *imgpos, const int verbose) |
| int | dcmImgDim (DCMFILE *d, unsigned short int *imgdim, const int verbose) |
| int | dcmImgPxlsize (DCMFILE *d, double *pxlsize, const int verbose) |
| int | dcmImgOrient (DCMFILE *d, double *iop, const int verbose) |
| int | dcmImgXform (double *iop, double *xyzMM, double *imgPos, double *xform, const int verbose) |
| int | dcmXformToQuatern (double *xform, double *quatern, double *qoffset, const int verbose) |
Extract information from DICOM image.
Definition in file dcmimage.c.
| int dcmImgDim | ( | DCMFILE * | d, |
| unsigned short int * | imgdim, | ||
| const int | verbose ) |
Get DICOM image dimensions.
| d | Pointer to DCMFILE. |
| imgdim | Pointer to imgdim array of x, y, z, and frame numbers, to be filled here. |
| verbose | Verbose level; if zero, then nothing is printed to stderr or stdout. |
Definition at line 232 of file dcmimage.c.
Referenced by imgReadDICOM().
| int dcmImgIsotope | ( | DCMFILE * | d, |
| isotope * | isot, | ||
| decaycorrection * | dc, | ||
| const int | verbose ) |
Get isotope and status of decaycorrection from DICOM.
| d | Pointer to DCMFILE. |
| isot | Pointer to isotope code, to be set here; enter NULL if not needed. |
| dc | Pointer to status of decaycorrection. |
| verbose | Verbose level; if zero, then nothing is printed to stderr or stdout. |
Definition at line 24 of file dcmimage.c.
Referenced by imgReadDICOM().
| int dcmImgOrient | ( | DCMFILE * | d, |
| double * | iop, | ||
| const int | verbose ) |
Get DICOM image orientation (Patient).
| d | Pointer to DCMFILE. |
| iop | Pointer to iop array of six values, to be filled here. |
| verbose | Verbose level; if zero, then nothing is printed to stderr or stdout. |
Definition at line 387 of file dcmimage.c.
Referenced by imgReadDICOM().
| int dcmImgPos | ( | DCMFILE * | d, |
| double * | imgpos, | ||
| const int | verbose ) |
Get DICOM Image Position (Patient).
| d | Pointer to DCMFILE. |
| imgpos | Pointer to imgpos array of x, y, and z coordinates of the upper left hand corner (centre of the first voxel) of the image, in mm, to be filled here. |
| verbose | Verbose level; if zero, then nothing is printed to stderr or stdout. |
Definition at line 121 of file dcmimage.c.
Referenced by imgReadDICOM().
| int dcmImgPxlsize | ( | DCMFILE * | d, |
| double * | pxlsize, | ||
| const int | verbose ) |
Get DICOM Image voxel size.
| d | Pointer to DCMFILE. |
| pxlsize | Pointer to pxlsize array of x, y, and z sizes of image pixel, or actually, mm distance between neighbour voxel centres in x, y, and z directions. |
| verbose | Verbose level; if zero, then nothing is printed to stderr or stdout. |
Definition at line 320 of file dcmimage.c.
Referenced by imgReadDICOM().
| int dcmImgXform | ( | double * | iop, |
| double * | xyzMM, | ||
| double * | imgPos, | ||
| double * | xform, | ||
| const int | verbose ) |
Calculate xform matrix from DICOM header information.
Based on dcm2niix xform_mat(), which is based on dicm2nii. Last vector xform[3][0..4] is not yet computed.
| iop | Array of 6 Image Orientation (Patient) parameters. |
| xyzMM | Array of 3 voxel sizes in mm (x, y, z). |
| imgPos | Array of 3 Image Position (Patient) parameters. |
| xform | Pointer to xform 4x4 matrix stored as an array of 16 doubles, to be filled here. |
| verbose | Verbose level; if zero, then nothing is printed to stderr or stdout. |
Definition at line 431 of file dcmimage.c.
Referenced by imgReadDICOM().
| int dcmXformToQuatern | ( | double * | xform, |
| double * | quatern, | ||
| double * | qoffset, | ||
| const int | verbose ) |
Calculate quatern parameters for NIfTI from xform matrix.
Based on dcm2niix, but results are compatible with TPC ImageConverter.
| xform | Pointer to xform 4x4 matrix stored as an array of 16 doubles; not modified. |
| quatern | Pointer to quatern parameter b, c, and d array (size of 3); filled here; enter NULL, if not needed. |
| qoffset | Pointer to qoffset parameter x, y, and z array (size of 3); filled here; enter NULL, if not needed. |
| verbose | Verbose level; if zero, then nothing is printed to stderr or stdout. |
Definition at line 540 of file dcmimage.c.
Referenced by imgReadDICOM().