2D Electron Microscopy images in IMP
More...
#include <IMP/em2d/Image.h>
2D Electron Microscopy images in IMP
Definition at line 27 of file Image.h.
|
void | set_defaults () |
|
void | set_size_data (int rows, int cols) |
|
| Object (std::string name) |
| Construct an object with the given name. More...
|
|
virtual void | do_destroy () |
|
IMP::em2d::Image::Image |
( |
int |
rows, |
|
|
int |
cols |
|
) |
| |
Create an empty image
- Parameters
-
rows | The number of rows |
cols | The number of columns |
Create an image reading from a file
- Parameters
-
filename | The name of the file containing the image |
reader | The image reader to use |
Definition at line 43 of file Image.h.
cv::Mat& IMP::em2d::Image::get_data |
( |
| ) |
|
Access to the matrix of data
- Returns
- A reference to the matrix of data
Definition at line 51 of file Image.h.
Access to the image header
- Returns
- A reference to the header with the EM parameters
Definition at line 94 of file Image.h.
FloatRange IMP::em2d::Image::get_min_and_max_values |
( |
| ) |
const |
Recover the minimum and maximum values in the image
- Returns
- A range. The first value is the minimum. The second one is the maximum.
String IMP::em2d::Image::get_name |
( |
| ) |
const |
Get the name of the image
- Returns
- A string with the name
Definition at line 167 of file Image.h.
virtual std::string IMP::em2d::Image::get_type_name |
( |
| ) |
const |
|
overridevirtual |
Get information about the module and version of the object.
Reimplemented from IMP::Object.
Definition at line 155 of file Image.h.
double IMP::em2d::Image::operator() |
( |
int |
i, |
|
|
int |
j |
|
) |
| const |
Recover the value of a pixel
- Parameters
-
- Returns
- the value
Definition at line 88 of file Image.h.
Read an image from file
- Parameters
-
filename | The name of the file containing the image |
reader | The image reader to use |
Definition at line 125 of file Image.h.
void IMP::em2d::Image::set_data |
( |
const cv::Mat & |
mat | ) |
|
Sets the entire data of the matrix
- Parameters
-
mat | CV matrix containing the data for an image |
void IMP::em2d::Image::set_name |
( |
const String & |
name | ) |
|
Set the name of the image
- Parameters
-
Definition at line 161 of file Image.h.
void IMP::em2d::Image::set_size |
( |
int |
rows, |
|
|
int |
cols |
|
) |
| |
Sets the size of the image
- Parameters
-
void IMP::em2d::Image::set_size |
( |
Image * |
img | ) |
|
Resize to the same size of the parameter image
- Parameters
-
img | The image to get the size from |
void IMP::em2d::Image::set_value |
( |
double |
val | ) |
|
Set all the pixels of an image
- Parameters
-
Definition at line 69 of file Image.h.
void IMP::em2d::Image::set_value |
( |
int |
i, |
|
|
int |
j, |
|
|
double |
val |
|
) |
| |
Sets the value for a pixel
- Parameters
-
Definition at line 80 of file Image.h.
void IMP::em2d::Image::set_zeros |
( |
| ) |
|
Sets the image to zero
Definition at line 62 of file Image.h.
void IMP::em2d::Image::show |
( |
std::ostream & |
out | ) |
const |
Shows information about the class
- Parameters
-
out | Stream used to show the information |
Definition at line 148 of file Image.h.
void IMP::em2d::Image::update_header |
( |
| ) |
|
Adjusts the information of the image header taking into account the dimensions of the data and setting the time, date, type, etc ... Adjust the information of the image header taking into account the dimensions of the data and setting the time, date, type, etc ...
Writes the image to a file (the image matrix of data is stored as floats when writing) Writes the image to a file (the image matrix of data is stored as floats when writing)
- Parameters
-
filename | The output file |
writer | The image writer to use |
Definition at line 139 of file Image.h.
cv::Mat IMP::em2d::Image::data_ |
|
protected |
Matrix with the data for the image.
Definition at line 184 of file Image.h.
Header for the image with all the pertinent information.
Definition at line 186 of file Image.h.
String IMP::em2d::Image::name_ |
|
protected |
Name of the image. Frequently it will be the name of the file.
Definition at line 181 of file Image.h.
The documentation for this class was generated from the following file: