EMAN2
Public Member Functions | Public Attributes | List of all members
EMAN::EMData::ClipInplaceVariables Class Reference

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 869 of file emdata.h.

Constructor & Destructor Documentation

◆ ClipInplaceVariables()

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 872 of file emdata.h.

872 :
873 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),
876 {
877 if ( xtrans > 0 ) x_iter -= xtrans;
878 if ( x_iter < 0 ) x_iter = 0;
879 if ( ytrans > 0 ) y_iter -= ytrans;
880 if ( y_iter < 0 ) y_iter = 0;
881 if ( ztrans > 0 ) z_iter -= ztrans;
882 if ( z_iter < 0 ) z_iter = 0;
883
884 // Get the depth in the new volume where slices are inserted
885 // if this value is zero it means that the last z-slice in the new
886 // volume contains image data
887 if ( (new_nz + ztrans) > prv_nz ) new_z_top = new_nz + ztrans - prv_nz;
888 if ( (new_ny + ytrans) > prv_ny ) new_y_back = new_ny + ytrans - prv_ny;
889 if ( (new_nx + xtrans) > prv_nx ) new_x_right = new_nx + xtrans - prv_nx;
890
891 if ( (new_nz + ztrans) < prv_nz )
892 {
893 prv_z_top = prv_nz - new_nz - ztrans;
894 z_iter -= prv_z_top;
895 }
896 if ( (new_ny + ytrans) < prv_ny )
897 {
898 prv_y_back = prv_ny - new_ny - ytrans;
900 }
901 if ( (new_nx + xtrans) < prv_nx )
902 {
903 prv_x_right = prv_nx - new_nx - xtrans;
905 }
906
907 if ( xtrans > 0 ) prv_x_left = xtrans;
908 if ( ytrans > 0 ) prv_y_front = ytrans;
909 if ( ztrans > 0 ) prv_z_bottom = ztrans;
910
911 if ( xtrans < 0 ) new_x_left = -xtrans;
912 if ( ytrans < 0 ) new_y_front = -ytrans;
913 if ( ztrans < 0 ) new_z_bottom = -ztrans;
914
915 }

References new_nx, new_ny, new_nz, new_x_left, new_x_right, new_y_back, new_y_front, new_z_bottom, new_z_top, prv_nx, prv_ny, prv_nz, prv_x_left, prv_x_right, prv_y_back, prv_y_front, prv_z_bottom, prv_z_top, x_iter, y_iter, and z_iter.

◆ ~ClipInplaceVariables()

EMAN::EMData::ClipInplaceVariables::~ClipInplaceVariables ( )
inline

Definition at line 916 of file emdata.h.

916{}

Member Data Documentation

◆ new_nx

int EMAN::EMData::ClipInplaceVariables::new_nx

Definition at line 918 of file emdata.h.

Referenced by ClipInplaceVariables().

◆ new_ny

int EMAN::EMData::ClipInplaceVariables::new_ny

Definition at line 918 of file emdata.h.

Referenced by ClipInplaceVariables().

◆ new_nz

int EMAN::EMData::ClipInplaceVariables::new_nz

Definition at line 918 of file emdata.h.

Referenced by ClipInplaceVariables().

◆ new_x_left

int EMAN::EMData::ClipInplaceVariables::new_x_left

Definition at line 921 of file emdata.h.

Referenced by ClipInplaceVariables().

◆ new_x_right

int EMAN::EMData::ClipInplaceVariables::new_x_right

Definition at line 921 of file emdata.h.

Referenced by ClipInplaceVariables().

◆ new_y_back

int EMAN::EMData::ClipInplaceVariables::new_y_back

Definition at line 921 of file emdata.h.

Referenced by ClipInplaceVariables().

◆ new_y_front

int EMAN::EMData::ClipInplaceVariables::new_y_front

Definition at line 921 of file emdata.h.

Referenced by ClipInplaceVariables().

◆ new_z_bottom

int EMAN::EMData::ClipInplaceVariables::new_z_bottom

Definition at line 921 of file emdata.h.

Referenced by ClipInplaceVariables().

◆ new_z_top

int EMAN::EMData::ClipInplaceVariables::new_z_top

Definition at line 921 of file emdata.h.

Referenced by ClipInplaceVariables().

◆ prv_nx

int EMAN::EMData::ClipInplaceVariables::prv_nx

Definition at line 918 of file emdata.h.

Referenced by ClipInplaceVariables().

◆ prv_ny

int EMAN::EMData::ClipInplaceVariables::prv_ny

Definition at line 918 of file emdata.h.

Referenced by ClipInplaceVariables().

◆ prv_nz

int EMAN::EMData::ClipInplaceVariables::prv_nz

Definition at line 918 of file emdata.h.

Referenced by ClipInplaceVariables().

◆ prv_x_left

int EMAN::EMData::ClipInplaceVariables::prv_x_left

Definition at line 922 of file emdata.h.

Referenced by ClipInplaceVariables().

◆ prv_x_right

int EMAN::EMData::ClipInplaceVariables::prv_x_right

Definition at line 922 of file emdata.h.

Referenced by ClipInplaceVariables().

◆ prv_y_back

int EMAN::EMData::ClipInplaceVariables::prv_y_back

Definition at line 922 of file emdata.h.

Referenced by ClipInplaceVariables().

◆ prv_y_front

int EMAN::EMData::ClipInplaceVariables::prv_y_front

Definition at line 922 of file emdata.h.

Referenced by ClipInplaceVariables().

◆ prv_z_bottom

int EMAN::EMData::ClipInplaceVariables::prv_z_bottom

Definition at line 922 of file emdata.h.

Referenced by ClipInplaceVariables().

◆ prv_z_top

int EMAN::EMData::ClipInplaceVariables::prv_z_top

Definition at line 922 of file emdata.h.

Referenced by ClipInplaceVariables().

◆ x_iter

int EMAN::EMData::ClipInplaceVariables::x_iter

Definition at line 920 of file emdata.h.

Referenced by ClipInplaceVariables().

◆ xshift

int EMAN::EMData::ClipInplaceVariables::xshift

Definition at line 919 of file emdata.h.

◆ y_iter

int EMAN::EMData::ClipInplaceVariables::y_iter

Definition at line 920 of file emdata.h.

Referenced by ClipInplaceVariables().

◆ yshift

int EMAN::EMData::ClipInplaceVariables::yshift

Definition at line 919 of file emdata.h.

◆ z_iter

int EMAN::EMData::ClipInplaceVariables::z_iter

Definition at line 920 of file emdata.h.

Referenced by ClipInplaceVariables().

◆ zshift

int EMAN::EMData::ClipInplaceVariables::zshift

Definition at line 919 of file emdata.h.


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