plastimatch
Loading...
Searching...
No Matches
rtog_io.cxx File Reference
#include "plm_config.h"
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <math.h>
#include "exchkeys.h"
#include "file_util.h"

Macros

#define BUFLEN   2048
 

Typedefs

typedef struct program_parms Program_Parms
 
typedef struct ct_header CT_Header
 
typedef struct dose_header DOSE_Header
 
typedef struct polyline Cxt_polyline
 
typedef struct polyline_slice Cxt_polyline_Slice
 
typedef struct structure STRUCTURE
 
typedef struct structure_list STRUCTURE_List
 
typedef struct rtog_header RTOG_Header
 
typedef struct rtog_line RTOG_Line
 

Functions

void print_usage (void)
 
void gs_strncpy (char *dst, char *src, int n)
 
int get_rtog_line (FILE *fp, char *key, char *val)
 
int parse_rtog_string (char **list, int list_size, char *str)
 
int parse_rtog_key (char *key)
 
int parse_rtog_value (char *value)
 
int parse_rtog_line (RTOG_Line *rtog_line, char *key, char *val)
 
int set_ct_ival (RTOG_Header *rtog_header, RTOG_Line *rtog_line, int imno, int *tgt, char *tgt_comment)
 
int set_ct_fval (RTOG_Header *rtog_header, RTOG_Line *rtog_line, int imno, float *tgt, char *tgt_comment)
 
void load_rtog_header (RTOG_Header *rtog_header, Program_Parms *parms)
 
void load_ct (RTOG_Header *rtog_header, Program_Parms *parms)
 
void make_output_dir (Program_Parms *parms)
 
void correct_ct (RTOG_Header *rtog_header)
 
void write_ct (RTOG_Header *rtog_header, Program_Parms *parms)
 
void free_ct (RTOG_Header *rtog_header)
 
void load_dose (RTOG_Header *rtog_header, Program_Parms *parms)
 
void correct_dose (RTOG_Header *rtog_header)
 
void write_dose (RTOG_Header *rtog_header, Program_Parms *parms)
 
void free_dose (RTOG_Header *rtog_header)
 
void load_structure (STRUCTURE *structure, Program_Parms *parms)
 
void load_skin (RTOG_Header *rtog_header, Program_Parms *parms)
 
void render_slice (RTOG_Header *rtog_header, unsigned char *slice_img, unsigned char *acc_img, Cxt_polyline_Slice *ps)
 
void render_skin (RTOG_Header *rtog_header, Program_Parms *parms)
 
void correct_skin (RTOG_Header *rtog_header)
 
void write_skin (RTOG_Header *rtog_header, Program_Parms *parms)
 
void free_skin (RTOG_Header *rtog_header)
 
void write_rtog_dose (Program_Parms *parms)
 

Variables

char mha_header_pat []
 

Macro Definition Documentation

◆ BUFLEN

#define BUFLEN   2048

Typedef Documentation

◆ CT_Header

typedef struct ct_header CT_Header

◆ Cxt_polyline

typedef struct polyline Cxt_polyline

◆ Cxt_polyline_Slice

typedef struct polyline_slice Cxt_polyline_Slice

◆ DOSE_Header

typedef struct dose_header DOSE_Header

◆ Program_Parms

typedef struct program_parms Program_Parms

◆ RTOG_Header

typedef struct rtog_header RTOG_Header

◆ RTOG_Line

typedef struct rtog_line RTOG_Line

◆ STRUCTURE

typedef struct structure STRUCTURE

◆ STRUCTURE_List

typedef struct structure_list STRUCTURE_List

Function Documentation

◆ correct_ct()

void correct_ct ( RTOG_Header * rtog_header)

◆ correct_dose()

void correct_dose ( RTOG_Header * rtog_header)

◆ correct_skin()

void correct_skin ( RTOG_Header * rtog_header)

◆ free_ct()

void free_ct ( RTOG_Header * rtog_header)

◆ free_dose()

void free_dose ( RTOG_Header * rtog_header)

◆ free_skin()

void free_skin ( RTOG_Header * rtog_header)

◆ get_rtog_line()

int get_rtog_line ( FILE * fp,
char * key,
char * val )

◆ gs_strncpy()

void gs_strncpy ( char * dst,
char * src,
int n )

◆ load_ct()

void load_ct ( RTOG_Header * rtog_header,
Program_Parms * parms )

◆ load_dose()

void load_dose ( RTOG_Header * rtog_header,
Program_Parms * parms )

◆ load_rtog_header()

void load_rtog_header ( RTOG_Header * rtog_header,
Program_Parms * parms )

◆ load_skin()

void load_skin ( RTOG_Header * rtog_header,
Program_Parms * parms )

◆ load_structure()

void load_structure ( STRUCTURE * structure,
Program_Parms * parms )

◆ make_output_dir()

void make_output_dir ( Program_Parms * parms)

◆ parse_rtog_key()

int parse_rtog_key ( char * key)

◆ parse_rtog_line()

int parse_rtog_line ( RTOG_Line * rtog_line,
char * key,
char * val )

◆ parse_rtog_string()

int parse_rtog_string ( char ** list,
int list_size,
char * str )

◆ parse_rtog_value()

int parse_rtog_value ( char * value)

◆ print_usage()

void print_usage ( void )

◆ render_skin()

void render_skin ( RTOG_Header * rtog_header,
Program_Parms * parms )

◆ render_slice()

void render_slice ( RTOG_Header * rtog_header,
unsigned char * slice_img,
unsigned char * acc_img,
Cxt_polyline_Slice * ps )

◆ set_ct_fval()

int set_ct_fval ( RTOG_Header * rtog_header,
RTOG_Line * rtog_line,
int imno,
float * tgt,
char * tgt_comment )

◆ set_ct_ival()

int set_ct_ival ( RTOG_Header * rtog_header,
RTOG_Line * rtog_line,
int imno,
int * tgt,
char * tgt_comment )

◆ write_ct()

void write_ct ( RTOG_Header * rtog_header,
Program_Parms * parms )

◆ write_dose()

void write_dose ( RTOG_Header * rtog_header,
Program_Parms * parms )

◆ write_rtog_dose()

void write_rtog_dose ( Program_Parms * parms)

◆ write_skin()

void write_skin ( RTOG_Header * rtog_header,
Program_Parms * parms )

Variable Documentation

◆ mha_header_pat

char mha_header_pat[]
Initial value:
=
"ObjectType = Image\n"
"NDims = 3\n"
"BinaryData = True\n"
"BinaryDataByteOrderMSB = False\n"
"Offset = %f %f %f\n"
"ElementSpacing = %f %f %f\n"
"DimSize = %d %d %d\n"
"AnatomicalOrientation = RAI\n"
"ElementType = %s\n"
"ElementDataFile = LOCAL\n"