Blender  V2.59
cineonfile.h
Go to the documentation of this file.
00001 
00004 /*
00005  *       Cineon image file format library definitions.
00006  *       Cineon file format structures.
00007  *
00008  *       This header file contains private details.
00009  *       User code should generally use cineonlib.h only.
00010  *
00011  *       Copyright 1999,2000,2001 David Hodson <hodsond@acm.org>
00012  *
00013  *       This program is free software; you can redistribute it and/or modify it
00014  *       under the terms of the GNU General Public License as published by the Free
00015  *       Software Foundation; either version 2 of the License, or (at your option)
00016  *       any later version.
00017  *
00018  *       This program is distributed in the hope that it will be useful, but
00019  *       WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
00020  *       or FITNESS FOR A PARTICULAR PURPOSE.    See the GNU General Public License
00021  *       for more details.
00022  *
00023  *       You should have received a copy of the GNU General Public License
00024  *       along with this program; if not, write to the Free Software
00025  *       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00026  *
00027  */
00028 
00029 #ifndef _CINEON_FILE_H_
00030 #define _CINEON_FILE_H_
00031 
00032 #include "logImageCore.h"
00033 
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037 
00038 typedef struct {
00039                 U32             magic_num;                              /* magic number */
00040                 U32             image_offset;                   /* offset to image data in bytes */
00041                 U32             gen_hdr_size;                   /* generic header length in bytes */
00042                 U32             ind_hdr_size;                   /* industry header length in bytes */
00043                 U32             user_data_size;         /* user-defined data length in bytes */
00044                 U32             file_size;                              /* file size in bytes */
00045                 ASCII vers[8];                                  /* which header format version is being used (v4.5) */
00046                 ASCII file_name[100];           /* image file name */
00047                 ASCII create_date[12];  /* file creation date */
00048                 ASCII create_time[12];  /* file creation time */
00049                 ASCII Reserved[36];                     /* reserved field TBD (need to pad) */
00050 } CineonFileInformation;
00051 
00052 typedef struct {
00053                 U8               designator1;
00054                 U8               designator2;
00055                 U8               bits_per_pixel;
00056                 U8               filler;
00057                 U32              pixels_per_line;
00058                 U32              lines_per_image;
00059                 U32              ref_low_data;           /* reference low data code value */
00060                 R32              ref_low_quantity; /* reference low quantity represented */
00061                 U32              ref_high_data;          /* reference high data code value */
00062                 R32              ref_high_quantity;/* reference high quantity represented */
00063 } CineonChannelInformation;
00064 
00065 typedef struct {
00066                 U8               orientation;                                    /* image orientation */
00067                 U8               channels_per_image;
00068                 U16              filler;
00069                 CineonChannelInformation channel[8];
00070                 R32              white_point_x;
00071                 R32              white_point_y;
00072                 R32              red_primary_x;
00073                 R32              red_primary_y;
00074                 R32              green_primary_x;
00075                 R32              green_primary_y;
00076                 R32              blue_primary_x;
00077                 R32              blue_primary_y;
00078                 ASCII    label[200];
00079                 ASCII    reserved[28];
00080 } CineonImageInformation;
00081 
00082 typedef struct {
00083                 U8              interleave;
00084                 U8              packing;
00085                 U8              signage;
00086                 U8              sense;
00087                 U32             line_padding;
00088                 U32             channel_padding;
00089                 ASCII reserved[20];
00090 } CineonFormatInformation;
00091 
00092 typedef struct {
00093                 S32             x_offset;
00094                 S32             y_offset;
00095                 ASCII file_name[100];
00096                 ASCII create_date[12];  /* file creation date */
00097                 ASCII create_time[12];  /* file creation time */
00098                 ASCII input_device[64];
00099                 ASCII model_number[32];
00100                 ASCII serial_number[32];
00101                 R32             x_input_samples_per_mm;
00102                 R32             y_input_samples_per_mm;
00103                 R32             input_device_gamma;
00104                 ASCII reserved[40];
00105 } CineonOriginationInformation;
00106 
00107 typedef struct {
00108         CineonFileInformation fileInfo;
00109         CineonImageInformation imageInfo;
00110         CineonFormatInformation formatInfo;
00111         CineonOriginationInformation originInfo;
00112 } CineonGenericHeader;
00113 
00114 typedef struct {
00115         U8 filmCode;
00116         U8 filmType;
00117         U8 perfOffset;
00118         U8 filler;
00119         U32 keycodePrefix;
00120         U32 keycodeCount;
00121         ASCII format[32];
00122         U32 framePosition; /* in sequence */
00123         R32 frameRate; /* frames per second */
00124         ASCII attribute[32];
00125         ASCII slate[200];
00126         ASCII reserved[740];
00127 } CineonMPISpecificInformation;
00128 
00129 #ifdef __cplusplus
00130 }
00131 #endif
00132 
00133 #endif /* _CINEON_FILE_H_ */