/usr/include/odindata/image.h is in libodin-dev 1.8.4-1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | /***************************************************************************
image.h - description
-------------------
begin : Fr Feb 25 2005
copyright : (C) 2001 by Thies Jochimsen
email : jochimse@cns.mpg.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef IMAGE_H
#define IMAGE_H
#include <odinpara/protocol.h>
//#include <odindata/data.h>
class Sample; // forward declaration
/**
* @addtogroup odindata
* @{
*/
/////////////////////////////////////////////////////////////////
/**
* Class to hold reconstructed images of one Geometry
*/
class Image : public JcampDxBlock {
public:
/**
* Default constructor
*/
Image(const STD_string& label="unnamedImage");
/**
* Copy constructor
*/
Image(const Image& i) {Image::operator = (i);}
/**
* Assignment operator
*/
Image& operator = (const Image& i);
/**
* Sets the magnitude data
*/
Image& set_magnitude(const farray& magn) {magnitude=magn; return *this;}
/**
* Scale magnitude to values between 0 and 1
*/
Image& normalize_magnitude() {magnitude.normalize(); return *this;}
/**
* Returns the magnitude data
*/
const farray& get_magnitude() const {return magnitude;}
/**
* Interpret data as 3D volume data and return size for given axis
*/
unsigned int size(axis ax) const;
/**
* Sets the parameter set which describes the area imaged
*/
Image& set_geometry(const Geometry& g) {geo=g; return *this;}
/**
* Returns the parameter set which describes the area imaged
*/
const Geometry& get_geometry() const {return geo;}
/**
* Transpose image in-plane, 'reverse_read' and 'reverse_phase'
* can be used to reverse read/phase direction before transposing.
*/
Image& transpose_inplane(bool reverse_read=false, bool reverse_phase=false);
// dummy comparison operator for lists
bool operator < (const Image& img) const {return STD_string(get_label())<STD_string(img.get_label());}
private:
void append_all_members();
Geometry geo;
JDXfloatArr magnitude;
};
/////////////////////////////////////////////////////////////////
/**
* Class to hold a whole list of Image's
*/
class ImageSet : public JcampDxBlock {
public:
/**
* Default constructor
*/
ImageSet(const STD_string& label="unnamedImageSet");
/**
* Copy constructor
*/
ImageSet(const Image& is) {ImageSet::operator = (is);}
/**
* Create image set from a sample file
*/
ImageSet(const Sample& smp);
/**
* Assignment operator
*/
ImageSet& operator = (const ImageSet& is);
/**
* Append another image to the set
*/
ImageSet& append_image(const Image& img);
/**
* Clear the list of images in this set
*/
ImageSet& clear_images();
/**
* Returns the number of images in this set
*/
int get_numof_images() const {return Content.length();}
/**
* Returns reference to the image at position 'index'
*/
Image& get_image(unsigned int index=0);
// overloading virtual functions of JcampDxBlock
int load(const STD_string& filename);
private:
void append_all_members();
JDXstringArr Content;
STD_list<Image> images;
Image dummy;
};
/** @}
*/
#endif
|