EMAN2
Public Member Functions | Public Attributes
EMAN::EMData::ClipInplaceVariables Class Reference

List of all members.

Public Member Functions

 ClipInplaceVariables (const int p_nx, const int p_ny, const int p_nz, const int n_nx, const int n_ny, const int n_nz, const int xtrans, const int ytrans, const int ztrans)
 ~ClipInplaceVariables ()

Public Attributes

int prv_nx
int prv_ny
int prv_nz
int new_nx
int new_ny
int new_nz
int xshift
int yshift
int zshift
int x_iter
int y_iter
int z_iter
int new_z_top
int new_z_bottom
int new_y_back
int new_y_front
int new_x_left
int new_x_right
int prv_z_top
int prv_z_bottom
int prv_y_back
int prv_y_front
int prv_x_left
int prv_x_right

Detailed Description

Definition at line 864 of file emdata.h.


Constructor & Destructor Documentation

EMAN::EMData::ClipInplaceVariables::ClipInplaceVariables ( const int  p_nx,
const int  p_ny,
const int  p_nz,
const int  n_nx,
const int  n_ny,
const int  n_nz,
const int  xtrans,
const int  ytrans,
const int  ztrans 
) [inline]

Definition at line 867 of file emdata.h.

                                                                                                                                                                                                          :
                                        prv_nx(p_nx), prv_ny(p_ny), prv_nz(p_nz), new_nx(n_nx), new_ny(n_ny), new_nz(n_nz), xshift(xtrans), yshift(ytrans), zshift(ztrans),
                                 x_iter(prv_nx), y_iter(prv_ny), z_iter(prv_nz), new_z_top(0), new_z_bottom(0),  new_y_back(0), new_y_front(0),new_x_left(0), new_x_right(0),
                                prv_z_top(0), prv_z_bottom(0), prv_y_back(0), prv_y_front(0), prv_x_left(0), prv_x_right(0)
                        {
                                if ( xtrans > 0 ) x_iter -= xtrans;
                                if ( x_iter < 0 ) x_iter = 0;
                                if ( ytrans > 0 ) y_iter -= ytrans;
                                if ( y_iter < 0 ) y_iter = 0;
                                if ( ztrans > 0 ) z_iter -= ztrans;
                                if ( z_iter < 0 ) z_iter = 0;

                                // Get the depth in the new volume where slices are inserted
                                // if this value is zero it means that the last z-slice in the new
                                // volume contains image data
                                if ( (new_nz + ztrans) > prv_nz ) new_z_top = new_nz + ztrans - prv_nz;
                                if ( (new_ny + ytrans) > prv_ny ) new_y_back = new_ny + ytrans - prv_ny;
                                if ( (new_nx + xtrans) > prv_nx ) new_x_right = new_nx + xtrans - prv_nx;

                                if ( (new_nz + ztrans) < prv_nz )
                                {
                                        prv_z_top = prv_nz - new_nz - ztrans;
                                        z_iter -= prv_z_top;
                                }
                                if ( (new_ny + ytrans) < prv_ny )
                                {
                                        prv_y_back = prv_ny - new_ny - ytrans;
                                        y_iter -= prv_y_back;
                                }
                                if ( (new_nx + xtrans) < prv_nx )
                                {
                                        prv_x_right = prv_nx - new_nx - xtrans;
                                        x_iter -= prv_x_right;
                                }

                                if ( xtrans > 0 ) prv_x_left = xtrans;
                                if ( ytrans > 0 ) prv_y_front = ytrans;
                                if ( ztrans > 0 ) prv_z_bottom = ztrans;

                                if ( xtrans < 0 ) new_x_left = -xtrans;
                                if ( ytrans < 0 ) new_y_front = -ytrans;
                                if ( ztrans < 0 ) new_z_bottom = -ztrans;

                        }
EMAN::EMData::ClipInplaceVariables::~ClipInplaceVariables ( ) [inline]

Definition at line 911 of file emdata.h.

{}

Member Data Documentation

Definition at line 913 of file emdata.h.

Referenced by EMAN::EMData::is_ri().

Definition at line 913 of file emdata.h.

Referenced by EMAN::EMData::is_ri().

Definition at line 913 of file emdata.h.

Referenced by EMAN::EMData::is_ri(), and EMAN::EMData::set_ri().

Definition at line 916 of file emdata.h.

Definition at line 916 of file emdata.h.

Referenced by EMAN::EMData::is_ri().

Definition at line 916 of file emdata.h.

Referenced by EMAN::EMData::is_ri().

Definition at line 916 of file emdata.h.

Definition at line 916 of file emdata.h.

Definition at line 916 of file emdata.h.

Referenced by EMAN::EMData::is_ri().

Definition at line 913 of file emdata.h.

Referenced by EMAN::EMData::is_ri().

Definition at line 913 of file emdata.h.

Referenced by EMAN::EMData::is_ri().

Definition at line 913 of file emdata.h.

Referenced by EMAN::EMData::is_ri().

Definition at line 917 of file emdata.h.

Definition at line 917 of file emdata.h.

Definition at line 917 of file emdata.h.

Definition at line 917 of file emdata.h.

Definition at line 917 of file emdata.h.

Definition at line 917 of file emdata.h.

Referenced by EMAN::EMData::set_ri().

Definition at line 915 of file emdata.h.

Referenced by EMAN::EMData::is_ri().

Definition at line 914 of file emdata.h.

Definition at line 915 of file emdata.h.

Referenced by EMAN::EMData::is_ri().

Definition at line 914 of file emdata.h.

Definition at line 915 of file emdata.h.

Referenced by EMAN::EMData::is_ri(), and EMAN::EMData::set_ri().

Definition at line 914 of file emdata.h.


The documentation for this class was generated from the following file: