EMAN2
alignoptions.cpp
Go to the documentation of this file.
00001 #include "alignoptions.h"
00002 
00003 AlignOptions::AlignOptions()
00004 {
00005     mask3D     = NULL;
00006     first_ring = 1;
00007     last_ring  = 0;
00008     rstep      = 1;
00009     ri         = 0;
00010     xrng       = 1.0;
00011     yrng       = 1.0;
00012     step       = 1.0;
00013     dtheta     = 15.0;
00014     snr        = 1.0;
00015     symmetry   = "c1";
00016     CTF        = false;
00017     have_angles = false;
00018     ref_angle_type = "P";
00019     use_sirt = true;
00020     sirt_tol = 1.0e-1;
00021     sirt_lam = 1.0e-4;
00022     sirt_maxit = 100;
00023     maxit      = 1;
00024 }
00025 
00026 AlignOptions::AlignOptions(Vec3i& volsize)
00027 {
00028     int min_dim = (volsize[0] < volsize[1] ? volsize[0] : volsize[1]);
00029     min_dim = (min_dim < volsize[2] ? min_dim : volsize[2]);
00030     // min_dim = min(nx,ny,nz)
00031     mask3D     = NULL;
00032     first_ring = 1;
00033     last_ring  = min_dim / 2 - 2;
00034     rstep      = 1;
00035     ri         = min_dim / 2 - 2;
00036     xrng       = 1.0;
00037     yrng       = 1.0;
00038     step       = 1.0;
00039     dtheta     = 15.0;
00040     snr        = 1.0;
00041     symmetry   = "c1";
00042     CTF        = false;
00043     have_angles = false;
00044     ref_angle_type = "P";
00045     use_sirt = true;
00046     sirt_tol = 1.0e-1;
00047     sirt_lam = 1.0e-4;
00048     sirt_maxit = 100;
00049     maxit      = 1;
00050 }
00051 
00052 AlignOptions::AlignOptions(const AlignOptions& old_options)
00053 {
00054     mask3D     = old_options.mask3D;
00055     first_ring = old_options.first_ring;
00056     last_ring  = old_options.last_ring;
00057     rstep      = old_options.rstep;
00058     ri         = old_options.ri;
00059     xrng       = old_options.xrng;
00060     yrng       = old_options.yrng;
00061     step       = old_options.step;
00062     dtheta     = old_options.dtheta;
00063     snr        = old_options.snr;
00064     symmetry   = old_options.symmetry;
00065     CTF        = old_options.CTF;
00066     have_angles = old_options.have_angles;
00067     ref_angle_type = old_options.ref_angle_type;
00068     use_sirt = old_options.use_sirt;
00069     sirt_tol = old_options.sirt_tol;
00070     sirt_lam = old_options.sirt_lam;
00071     sirt_maxit = old_options.sirt_maxit;
00072     maxit      = old_options.maxit;
00073 }
00074 
00075 AlignOptions::~AlignOptions()
00076 {
00077 }
00078 
00079 void AlignOptions::set_mask3D(EMData * in_mask3D){
00080     mask3D = in_mask3D;
00081 }
00082 void AlignOptions::set_first_ring(int in_first_ring){
00083     first_ring = in_first_ring;
00084 }
00085 void AlignOptions::set_last_ring(int in_last_ring){
00086     last_ring = in_last_ring;
00087 }
00088 void AlignOptions::set_rstep(int in_rstep){
00089     rstep = in_rstep;
00090 }
00091 void AlignOptions::set_ri(int in_ri){
00092     ri = in_ri;
00093 }
00094 void AlignOptions::set_xrng(float in_xrng){
00095     xrng = in_xrng;
00096 }
00097 void AlignOptions::set_yrng(float in_yrng){
00098     yrng = in_yrng;
00099 }
00100 void AlignOptions::set_step(float in_step){
00101     step = in_step;
00102 }
00103 void AlignOptions::set_dtheta(float in_dtheta){
00104     dtheta = in_dtheta;
00105 }
00106 void AlignOptions::set_snr(float in_snr){
00107     snr = in_snr;
00108 }
00109 void AlignOptions::set_symmetry(std::string in_symmetry){
00110     symmetry = in_symmetry;
00111 }
00112 void AlignOptions::set_CTF(bool in_CTF){
00113     CTF = in_CTF;
00114 }
00115 void AlignOptions::set_have_angles(bool in_have_angles){
00116     have_angles = in_have_angles;
00117 }
00118 void AlignOptions::set_ref_angle_type(std::string in_ref_angle_type){
00119     ref_angle_type = in_ref_angle_type;
00120 }
00121 void AlignOptions::set_use_sirt(bool in_use_sirt){
00122     use_sirt = in_use_sirt;
00123 }
00124 void AlignOptions::set_sirt_tol(float in_sirt_tol){
00125     sirt_tol = in_sirt_tol;
00126 }
00127 void AlignOptions::set_sirt_lam(float in_sirt_lam){
00128     sirt_lam = in_sirt_lam;
00129 }
00130 void AlignOptions::set_sirt_maxit(int in_sirt_maxit){
00131     sirt_maxit = in_sirt_maxit;
00132 }
00133 void AlignOptions::set_maxit(int in_maxit){
00134     maxit = in_maxit;
00135 }
00136 
00137 EMData * AlignOptions::get_mask3D(){
00138     return mask3D;
00139 }
00140 int   AlignOptions::get_first_ring(){
00141     return first_ring;
00142 }
00143 int   AlignOptions::get_last_ring(){
00144     return last_ring;
00145 }
00146 int   AlignOptions::get_rstep(){
00147     return rstep;
00148 }
00149 int   AlignOptions::get_ri(){
00150     return ri;
00151 }
00152 float AlignOptions::get_xrng(){
00153     return xrng;
00154 }
00155 float AlignOptions::get_yrng(){
00156     return yrng;
00157 }
00158 float AlignOptions::get_step(){
00159     return step;
00160 }
00161 float AlignOptions::get_dtheta(){
00162     return dtheta;
00163 }
00164 float AlignOptions::get_snr(){
00165     return snr;
00166 }
00167 std::string AlignOptions::get_symmetry(){
00168     return symmetry;
00169 }
00170 bool AlignOptions::get_CTF(){
00171     return CTF;
00172 }
00173 bool AlignOptions::get_have_angles(){
00174     return have_angles;
00175 }
00176 std::string AlignOptions::get_ref_angle_type(){
00177     return ref_angle_type;
00178 }
00179 bool AlignOptions::get_use_sirt(){
00180     return use_sirt;
00181 }
00182 float AlignOptions::get_sirt_tol(){
00183     return sirt_tol;
00184 }
00185 float AlignOptions::get_sirt_lam(){
00186     return sirt_lam;
00187 }
00188 int AlignOptions::get_sirt_maxit(){
00189     return sirt_maxit;
00190 }
00191 int AlignOptions::get_maxit(){
00192     return maxit;
00193 }