/** * \file MRCHeader.cpp * \brief Header information for an MRC file. * * Copyright 2007-2013 IMP Inventors. All rights reserved. * */ #include IMPEM_BEGIN_INTERNAL_NAMESPACE void MRCHeader::FromDensityHeader(const DensityHeader &h) { std::string empty; nz=h.get_nz(); ny=h.get_ny(); nx=h.get_nx(); // map size // mode if(h.get_data_type()==0) // data type not initialized mode = 2; if(h.get_data_type()==1) mode=0; // 8-bits else if(h.get_data_type()==2) mode=1;// 16-bits else if(h.get_data_type()==5) mode=2;// 32-bits // number of first columns in map (default = 0) nxstart=h.nxstart ; nystart=h.nystart ; nzstart=h.nzstart; mx=h.mx ; my=h.my ; mz=h.mz; // Number of intervals along each dimension xlen=h.xlen ; ylen=h.ylen ; zlen=h.zlen; // Cell dimensions (angstroms) alpha=h.alpha ; beta=h.beta ; gamma=h.gamma; // Cell angles (degrees) /* Axes corresponding to columns (mapc), rows (mapr) and sections (maps) (1,2,3 for x,y,z) */ mapc=h.mapc; mapr=h.mapr; maps=h.maps; /* Minimum, maximum and mean density value */ dmin=h.dmin; dmax=h.dmax; dmean=h.dmean; ispg=h.ispg; // Sapce group number 0 or 1 (default 0) nsymbt=h.nsymbt; // Number of bytes used for symmetry data (0 or 80) // extra space used for anything - 0 by default for(int i=0;i