EMAN2
sspiderio.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__single_spider_io_h__
33#define eman__single_spider_io_h__ 1
34
35#include "spiderio.h"
36
37
38namespace EMAN
39{
44 class SingleSpiderIO : public SpiderIO
45 {
46 public:
51 explicit SingleSpiderIO(const string & fname, IOMode rw_mode = READ_ONLY);
53
65 int write_header(const Dict & dict, int image_index = 0, const Region* area = 0,
66 EMUtil::EMDataType filestoragetype = EMUtil::EM_FLOAT,
67 bool use_host_endian = true);
68
80 int write_data(float *data, int image_index = 0, const Region* area = 0,
81 EMUtil::EMDataType filestoragetype = EMUtil::EM_FLOAT,
82 bool use_host_endian = true);
83
84 static bool is_valid(const void *first_block);
85
87 {
88 return true;
89 }
90
91 protected:
92 bool is_valid_spider(const void *first_block);
93 };
94
95}
96
97#endif
Dict is a dictionary to store <string, EMObject> pair.
Definition: emobject.h:385
EMDataType
Image pixel data type used in EMAN.
Definition: emutil.h:92
IOMode rw_mode
Definition: imageio.h:353
Region defines a 2D or 3D rectangular region specified by its origin coordinates and all edges' sizes...
Definition: geometry.h:497
Single Spider Image I/O class.
Definition: sspiderio.h:45
SingleSpiderIO(const string &fname, IOMode rw_mode=READ_ONLY)
SingleSpiderIO constructor.
Definition: sspiderio.cpp:40
int write_header(const Dict &dict, int image_index=0, const Region *area=0, EMUtil::EMDataType filestoragetype=EMUtil::EM_FLOAT, bool use_host_endian=true)
Write a single SPIDER format header to an image.
Definition: sspiderio.cpp:51
bool is_valid_spider(const void *first_block)
check the data block to see if it represents valid stacked SPIDER image file header
Definition: sspiderio.cpp:132
int write_data(float *data, int image_index=0, const Region *area=0, EMUtil::EMDataType filestoragetype=EMUtil::EM_FLOAT, bool use_host_endian=true)
Write data to an image.
Definition: sspiderio.cpp:63
static bool is_valid(const void *first_block)
Definition: sspiderio.cpp:71
bool is_single_image_format() const
Is this image format only storing 1 image or not.
Definition: sspiderio.h:86
SPIDER: (System for Processing Image Data from Electron microscopy and Related fields) is an image pr...
Definition: spiderio.h:72
E2Exception class.
Definition: aligner.h:40