EMAN2
tifio.h
Go to the documentation of this file.
1/*
2 * Author: Steven Ludtke, 04/10/2003 (sludtke@bcm.edu)
3 * Copyright (c) 2000-2006 Baylor College of Medicine
4 *
5 * This software is issued under a joint BSD/GNU license. You may use the
6 * source code in this file under either license. However, note that the
7 * complete EMAN2 and SPARX software packages have some GPL dependencies,
8 * so you are responsible for compliance with the licenses of these packages
9 * if you opt to use BSD licensing. The warranty disclaimer below holds
10 * in either instance.
11 *
12 * This complete copyright notice must be included in any revised version of the
13 * source code. Additional authorship citations may be added, but existing
14 * author citations must be preserved.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, write to the Free Software
28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 *
30 * */
31
32#ifndef eman__tiffio_h__
33#define eman__tiffio_h__ 1
34
35#ifdef USE_TIFF
36
37#include "imageio.h"
38
39typedef struct tiff TIFF;
40
41namespace EMAN
42{
48 class TiffIO : public ImageIO
49 {
50 public:
51 explicit TiffIO(const string & fname, IOMode rw_mode = READ_ONLY);
52 ~TiffIO();
53
55 static bool is_valid(const void *first_block);
56 int get_nimg();
57
58 private:
59 enum
60 {
61 TIFF_LITTLE_ENDIAN = 0x49,
62 TIFF_BIG_ENDIAN = 0x4d
63 };
64
65 TIFF *tiff_file;
66 int nimg;
67 unsigned short bitspersample;
68 unsigned short photometric;
69 bool is_big_endian;
70
71 unsigned int nx;
72 unsigned int ny;
73 unsigned int nz;
74
75 float rendermin;
76 float rendermax;
77 int renderbits;
78 };
79}
80
81#endif //USE_TIFF
82
83#endif //eman__tiffio_h__
#define DEFINE_IMAGEIO_FUNC
DEFINE_IMAGEIO_FUNC declares the functions that needs to be implemented by any subclass of ImageIO.
Definition: imageio.h:361
E2Exception class.
Definition: aligner.h:40