Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

object_io.c File Reference

#include <volume_io/internal_volume_io.h>
#include <bicpl/objects.h>
#include <bicpl/geom.h>

Include dependency graph for object_io.c:

Include dependency graph

Go to the source code of this file.

Defines

#define PIXELS_PER_LINE   1
#define BUFFER_SIZE   256

Functions

private Status io_vectors (FILE *file, IO_types io_flag, File_formats format, int n, Vector *vectors[])
private Status io_line_thickness (FILE *file, IO_types io_flag, File_formats format, float *line_thickness)
private Status io_end_indices (FILE *file, IO_types io_flag, File_formats format, int n_items, int *end_indices[], int min_size)
private Status io_points (FILE *file, IO_types io_flag, File_formats format, int n, Point *points[])
public Status io_lines (FILE *file, IO_types io_flag, File_formats format, lines_struct *lines)
public Status io_marker (FILE *file, IO_types io_flag, File_formats format, marker_struct *marker)
public Status io_model (FILE *file, IO_types io_flag, File_formats format, model_struct *model)
public Status io_pixels (FILE *file, IO_types io_flag, File_formats format, pixels_struct *pixels)
private BOOLEAN use_compressed_polygons (void)
public void set_use_compressed_polygons_flag (BOOLEAN value)
public BOOLEAN get_use_compressed_polygons_flag (void)
public Status io_polygons (FILE *file, IO_types io_flag, File_formats format, polygons_struct *polygons)
public Status io_quadmesh (FILE *file, IO_types io_flag, File_formats format, quadmesh_struct *quadmesh)
 Read or write quadmesh structure.

public Status io_text (FILE *file, IO_types io_flag, File_formats format, text_struct *text)
public Status io_point (FILE *file, IO_types io_flag, File_formats format, Point *point)
public Status io_vector (FILE *file, IO_types io_flag, File_formats format, Vector *v)
public Status io_colour (FILE *file, IO_types io_flag, File_formats format, Colour *colour)
public Status io_colours (FILE *file, IO_types io_flag, File_formats format, Colour_flags *colour_flag, int n_items, int n_points, Colour **colours)
public Status io_surfprop (FILE *file, IO_types io_flag, File_formats format, Surfprop *surfprop)
public Status io_object_type (FILE *file, IO_types io_flag, File_formats format, Object_types type)
public Status input_object_type (FILE *file, Object_types *type, File_formats *format, BOOLEAN *eof)
public Status io_pixel_colours (FILE *file, IO_types io_flag, File_formats format, int n, Colour *pixel_colours[])
public Status io_pixel_colour (FILE *file, IO_types io_flag, File_formats format, Colour *pixel_colour)
public Status input_object (STRING directory, FILE *file, File_formats *format, object_struct **object, BOOLEAN *eof)
public Status output_object (FILE *file, File_formats format, object_struct *object)


Define Documentation

#define BUFFER_SIZE   256
 

Definition at line 1298 of file object_io.c.

Referenced by io_pixel_colours().

#define PIXELS_PER_LINE   1
 

Definition at line 1297 of file object_io.c.

Referenced by io_pixel_colours().


Function Documentation

public BOOLEAN get_use_compressed_polygons_flag void   ) 
 

Definition at line 484 of file object_io.c.

References use_compressed_polygons().

public Status input_object STRING  directory,
FILE *  file,
File_formats *  format,
object_struct **  object,
BOOLEAN *  eof
 

Definition at line 1507 of file object_io.c.

References create_object(), model_struct::filename, get_lines_ptr(), get_marker_ptr(), get_model_ptr(), get_pixels_ptr(), get_polygons_ptr(), get_quadmesh_ptr(), get_text_ptr(), input_graphics_file(), input_object_type(), io_lines(), io_marker(), io_model(), io_pixels(), io_polygons(), io_quadmesh(), io_text(), LINES, MARKER, MODEL, model_struct::n_objects, Object_types, model_struct::objects, PIXELS, POLYGONS, QUADMESH, and TEXT.

Referenced by input_graphics_file().

public Status input_object_type FILE *  file,
Object_types type,
File_formats *  format,
BOOLEAN *  eof
 

Definition at line 1244 of file object_io.c.

References FALSE, LINES, MARKER, MODEL, PIXELS, POLYGONS, QUADMESH, TEXT, and TRUE.

Referenced by input_object().

public Status io_colour FILE *  file,
IO_types  io_flag,
File_formats  format,
Colour *  colour
 

Definition at line 876 of file object_io.c.

Referenced by io_colours(), io_marker(), and io_text().

public Status io_colours FILE *  file,
IO_types  io_flag,
File_formats  format,
Colour_flags colour_flag,
int  n_items,
int  n_points,
Colour **  colours
 

Definition at line 953 of file object_io.c.

References io_colour(), ONE_COLOUR, PER_ITEM_COLOURS, and PER_VERTEX_COLOURS.

Referenced by io_lines(), io_polygons(), and io_quadmesh().

private Status io_end_indices FILE *  file,
IO_types  io_flag,
File_formats  format,
int  n_items,
int *  end_indices[],
int  min_size
 

Definition at line 1670 of file object_io.c.

Referenced by io_lines(), and io_polygons().

private Status io_line_thickness FILE *  file,
IO_types  io_flag,
File_formats  format,
float *  line_thickness
 

Definition at line 1474 of file object_io.c.

Referenced by io_lines().

public Status io_lines FILE *  file,
IO_types  io_flag,
File_formats  format,
lines_struct lines
 

Definition at line 210 of file object_io.c.

References lines_struct::colour_flag, lines_struct::colours, lines_struct::end_indices, lines_struct::indices, initialize_lines(), io_colours(), io_end_indices(), io_line_thickness(), io_object_type(), io_points(), lines_struct::line_thickness, LINES, lines_struct::n_items, lines_struct::n_points, NUMBER_INDICES, lines_struct::points, and WHITE.

Referenced by input_object(), and output_object().

public Status io_marker FILE *  file,
IO_types  io_flag,
File_formats  format,
marker_struct marker
 

Definition at line 302 of file object_io.c.

References marker_struct::colour, io_colour(), io_object_type(), io_point(), marker_struct::label, MARKER, marker_struct::patient_id, marker_struct::position, marker_struct::size, marker_struct::structure_id, and marker_struct::type.

Referenced by input_object(), and output_object().

public Status io_model FILE *  file,
IO_types  io_flag,
File_formats  format,
model_struct model
 

Definition at line 359 of file object_io.c.

References model_struct::filename, io_object_type(), and MODEL.

Referenced by input_object(), and output_object().

public Status io_object_type FILE *  file,
IO_types  io_flag,
File_formats  format,
Object_types  type
 

Definition at line 1186 of file object_io.c.

References LINES, MARKER, MODEL, PIXELS, POLYGONS, QUADMESH, and TEXT.

Referenced by io_lines(), io_marker(), io_model(), io_pixels(), io_polygons(), io_quadmesh(), and io_text().

public Status io_pixel_colour FILE *  file,
IO_types  io_flag,
File_formats  format,
Colour *  pixel_colour
 

Definition at line 1418 of file object_io.c.

Referenced by io_pixel_colours().

public Status io_pixel_colours FILE *  file,
IO_types  io_flag,
File_formats  format,
int  n,
Colour *  pixel_colours[]
 

Definition at line 1317 of file object_io.c.

References BUFFER_SIZE, io_pixel_colour(), and PIXELS_PER_LINE.

Referenced by io_pixels().

public Status io_pixels FILE *  file,
IO_types  io_flag,
File_formats  format,
pixels_struct pixels
 

Definition at line 394 of file object_io.c.

References COLOUR_INDEX_16BIT_PIXEL, COLOUR_INDEX_8BIT_PIXEL, pixels_struct::data, io_object_type(), io_pixel_colours(), pixels_struct::pixel_type, PIXELS, RGB_PIXEL, pixels_struct::x_position, pixels_struct::x_size, pixels_struct::x_zoom, pixels_struct::y_position, pixels_struct::y_size, and pixels_struct::y_zoom.

Referenced by input_object(), and output_object().

public Status io_point FILE *  file,
IO_types  io_flag,
File_formats  format,
Point *  point
 

Definition at line 787 of file object_io.c.

Referenced by io_marker(), io_points(), io_tag_point(), and io_text().

private Status io_points FILE *  file,
IO_types  io_flag,
File_formats  format,
int  n,
Point *  points[]
 

Definition at line 1071 of file object_io.c.

References io_point().

Referenced by io_lines(), io_polygons(), and io_quadmesh().

public Status io_polygons FILE *  file,
IO_types  io_flag,
File_formats  format,
polygons_struct polygons
 

Definition at line 505 of file object_io.c.

References polygons_struct::colour_flag, polygons_struct::colours, compute_polygon_normals(), create_tetrahedral_sphere(), polygons_struct::end_indices, FALSE, polygons_struct::indices, initialize_polygons(), io_colours(), io_end_indices(), io_object_type(), io_points(), io_surfprop(), io_vectors(), is_this_tetrahedral_topology(), polygons_struct::line_thickness, polygons_struct::n_items, polygons_struct::n_points, polygons_struct::normals, NUMBER_INDICES, polygons_struct::points, POLYGONS, polygons_struct::surfprop, TRUE, use_compressed_polygons(), and WHITE.

Referenced by input_object(), and output_object().

public Status io_quadmesh FILE *  file,
IO_types  io_flag,
File_formats  format,
quadmesh_struct quadmesh
 

Read or write quadmesh structure.

Parameters:
io_flag one of READ_FILE or WRITE_FILE
format one of ASCII_FORMAT or BINARY_FORMAT

Definition at line 654 of file object_io.c.

References quadmesh_struct::colour_flag, quadmesh_struct::colours, initialize_quadmesh(), io_colours(), io_object_type(), io_points(), io_surfprop(), io_vectors(), quadmesh_struct::m, quadmesh_struct::m_closed, quadmesh_struct::n, quadmesh_struct::n_closed, quadmesh_struct::normals, quadmesh_struct::points, QUADMESH, quadmesh_struct::surfprop, and WHITE.

Referenced by input_object(), and output_object().

public Status io_surfprop FILE *  file,
IO_types  io_flag,
File_formats  format,
Surfprop *  surfprop
 

Definition at line 1014 of file object_io.c.

Referenced by io_polygons(), and io_quadmesh().

public Status io_text FILE *  file,
IO_types  io_flag,
File_formats  format,
text_struct text
 

Definition at line 740 of file object_io.c.

References text_struct::colour, text_struct::font, io_colour(), io_object_type(), io_point(), text_struct::origin, text_struct::size, text_struct::string, and TEXT.

Referenced by input_object(), and output_object().

public Status io_vector FILE *  file,
IO_types  io_flag,
File_formats  format,
Vector *  v
 

Definition at line 832 of file object_io.c.

Referenced by io_vectors().

private Status io_vectors FILE *  file,
IO_types  io_flag,
File_formats  format,
int  n,
Vector *  vectors[]
 

Definition at line 1130 of file object_io.c.

References io_vector().

Referenced by io_polygons(), and io_quadmesh().

public Status output_object FILE *  file,
File_formats  format,
object_struct object
 

Definition at line 1601 of file object_io.c.

References get_lines_ptr(), get_marker_ptr(), get_model_ptr(), get_pixels_ptr(), get_polygons_ptr(), get_quadmesh_ptr(), get_text_ptr(), io_lines(), io_marker(), io_model(), io_pixels(), io_polygons(), io_quadmesh(), io_text(), LINES, MARKER, MODEL, object_struct::object_type, PIXELS, POLYGONS, QUADMESH, and TEXT.

Referenced by output_graphics_file().

public void set_use_compressed_polygons_flag BOOLEAN  value  ) 
 

Definition at line 477 of file object_io.c.

References TRUE.

private BOOLEAN use_compressed_polygons void   ) 
 

Definition at line 466 of file object_io.c.

References TRUE.

Referenced by get_use_compressed_polygons_flag(), and io_polygons().


Generated on Wed Jul 28 09:11:12 2004 for BICPL by doxygen 1.3.7