Xmipp  v3.23.11-Nereus
Modules | Classes | Macros | Enumerations | Variables
Collaboration diagram for Images:

Modules

 Image Formats
 
 Extension to Image class
 

Classes

class  ImageOver
 
class  Image< T >
 
struct  ImageFHandler
 
struct  ImageInfo
 
struct  ApplyGeoParams
 
class  ImageBase
 Image base class. More...
 

Macros

#define SWAPTRIG   16776960
 

Enumerations

enum  TransformType {
  NoTransform = 0, Standard = 1, Centered = 2, Hermitian = 3,
  CentHerm = 4
}
 
enum  WriteMode {
  WRITE_READONLY, WRITE_OVERWRITE, WRITE_REPLACE, WRITE_APPEND,
  WRITE_LAST_LABEL, WRITE_READONLY, WRITE_OVERWRITE, WRITE_REPLACE,
  WRITE_APPEND, WRITE_LAST_LABEL
}
 
enum  DataMode {
  _NONE = -2, HEADER = -1, _HEADER_ALL = 0, DATA = 1,
  _DATA_ALL = 2
}
 
enum  CastWriteMode { CW_CAST, CW_CONVERT, CW_ADJUST, CW_LAST_LABEL }
 

Variables

const size_t rw_max_page_size = 4194304
 
const ApplyGeoParams DefaultApplyGeoParams
 

Images Speed-up

#define VOLMATRIX(V)   ((V).data)
 
#define IMGMATRIX(I)   ((I).data)
 
#define IMGPIXEL(I, i, j)   A2D_ELEM(((I).data), (i), (j))
 
#define DIRECT_IMGPIXEL(I, i, j)   DIRECT_A2D_ELEM(((I).data), (i), (j))
 
#define VOLVOXEL(V, k, i, j)   A3D_ELEM(((V).data), (k), (i), (j))
 
#define DIRECT_VOLVOXEL(I, k, i, j)   DIRECT_A3D_ELEM(((I).data), (k), (i), (j))
 

Detailed Description

Macro Definition Documentation

◆ DIRECT_IMGPIXEL

#define DIRECT_IMGPIXEL (   I,
  i,
  j 
)    DIRECT_A2D_ELEM(((I).data), (i), (j))

Physical pixel access.

The physical pixel access gives you access to a pixel by its physical position and not by its logical one. This access shouldn't be used as a custom, use instead the logical access, but there might be cases in which this access might be interesting. Physical positions start at index 0 in C.

std::cout << "This is the first pixel stored in the Image " <<
DIRECT_IMGPIXEL(V, 0, 0) << std::endl;

Definition at line 200 of file xmipp_image_base.h.

◆ DIRECT_VOLVOXEL

#define DIRECT_VOLVOXEL (   I,
  k,
  i,
  j 
)    DIRECT_A3D_ELEM(((I).data), (k), (i), (j))

Physical voxel access.

The physical voxel access gives you access to a voxel by its physical position and not by its logical one. This access shouldn't be used as a custom, use instead the logical access, but there might be cases in which this access might be interesting. Physical positions start at index 0 in C.

std::cout << "This is the first voxel stored in the Volume " <<
DIRECT_VOLVOXEL(V, 0, 0, 0) << std::endl;

Definition at line 228 of file xmipp_image_base.h.

◆ IMGMATRIX

#define IMGMATRIX (   I)    ((I).data)

Image Matrix access.

This macro does the same as the normal 2D matrix access but in a faster way as no function call is generated.

IMGMATRIX(V).resize(128, 128);
IMGMATRIX(V2) = IMGMATRIX(V1) + IMGMATRIX(V2);

Definition at line 181 of file xmipp_image_base.h.

◆ IMGPIXEL

#define IMGPIXEL (   I,
  i,
  j 
)    A2D_ELEM(((I).data), (i), (j))

Pixel access. For fast access to pixel values (and for backwards compatibility of the code)

Definition at line 186 of file xmipp_image_base.h.

◆ SWAPTRIG

#define SWAPTRIG   16776960

Swapping trigger. Threshold file z size above which bytes are swapped.

Definition at line 234 of file xmipp_image_base.h.

◆ VOLMATRIX

#define VOLMATRIX (   V)    ((V).data)

Volume Matrix access.

This macro does the same as the normal 3D matrix access but in a faster way as no function call is generated.

VOLMATRIX(V).resize(128, 128, 128);
VOLMATRIX(V2) = VOLMATRIX(V1) + VOLMATRIX(V2);

Definition at line 168 of file xmipp_image_base.h.

◆ VOLVOXEL

#define VOLVOXEL (   V,
  k,
  i,
  j 
)    A3D_ELEM(((V).data), (k), (i), (j))

Voxel access.

This macro does the same as the normal voxel access (remember, logical access) but in a faster way as no function call is generated.

std::cout << "Grey level of voxel (2,-3,-3) of the Volume = " <<
VOLVOXEL(V, 2, -3, -3) << std::endl;
VOLVOXEL(I, 2, -3, -3) = VOLVOXEL(I, 2, -3, -2);

Definition at line 214 of file xmipp_image_base.h.

Enumeration Type Documentation

◆ CastWriteMode

Enumerator
CW_CAST 
CW_CONVERT 
CW_ADJUST 
CW_LAST_LABEL 

Definition at line 101 of file xmipp_image_base.h.

102 {
103  // prefix needed so extract_image_enums.py script can create the equivalent class for Java
104  CW_CAST, //Only cast the data type
105  CW_CONVERT, //Convert the data from one type to another
106  CW_ADJUST, //Adjust the histogram to fill the gray level range
107  CW_LAST_LABEL // **** NOTE ****: Do keep this label always at the end
108  // it is here for looping purposes
109 } CastWriteMode;
CastWriteMode

◆ DataMode

enum DataMode

Data mode This enumerate which data will be read/write from image files We can read/write complete image or only its headers(w/o geometrical information)

Enumerator
_NONE 
HEADER 
_HEADER_ALL 
DATA 
_DATA_ALL 

Definition at line 88 of file xmipp_image_base.h.

89 {
90  _NONE = -2, // Nothing to do. Used by ImageGeneric to check the right datatype to be used
91  HEADER = -1, //Don't read image data, only info from main header(datatype and dimensions)
92  _HEADER_ALL = 0, //Read complete header(main and geo), useful for header_extract and header_assign
93  DATA = 1, //Read image data and main header, geometrical transformations will be ignored
94  _DATA_ALL = 2 //Read data with complete header(the use of this option is not recommended, all Xmipp
95  // programs should read and write geo info through metadatas
96 }DataMode;
DataMode

◆ TransformType

Transform type. This type defines the kind of image.

Enumerator
NoTransform 
Standard 
Centered 
Hermitian 
CentHerm 

Definition at line 62 of file xmipp_image_base.h.

63 {
64  NoTransform = 0, // No transform
65  Standard = 1, // Standard transform: origin = (0,0,0)
66  Centered = 2, // Centered transform: origin = (nx/2,ny/2,nz/2)
67  Hermitian = 3, // Hermitian half: origin = (0,0,0)
68  CentHerm = 4 // Centered hermitian: origin = (0,ny/2,nz/2)
TransformType

◆ WriteMode

enum WriteMode

Write mode This class defines the writing behavior.

Enumerator
WRITE_READONLY 
WRITE_OVERWRITE 
WRITE_REPLACE 
WRITE_APPEND 
WRITE_LAST_LABEL 
WRITE_READONLY 
WRITE_OVERWRITE 
WRITE_REPLACE 
WRITE_APPEND 
WRITE_LAST_LABEL 

Definition at line 74 of file xmipp_image_base.h.

75 {
76  WRITE_READONLY, //only can read the file
77  WRITE_OVERWRITE, //forget about the old file and overwrite it
78  WRITE_REPLACE, //replace a particular object by another
79  WRITE_APPEND, //append and object at the end of a stack, so far can not append stacks
80  WRITE_LAST_LABEL // **** NOTE ****: Do keep this label always at the end
81  // it is here for looping purposes
82 } WriteMode;
WriteMode

Variable Documentation

◆ DefaultApplyGeoParams

const ApplyGeoParams DefaultApplyGeoParams

Definition at line 152 of file xmipp_image_base.h.

◆ rw_max_page_size

const size_t rw_max_page_size = 4194304

Size of the page used to read and write images from/to file

Definition at line 45 of file xmipp_image.h.