EMAN2
Functions
emdata_io.cpp File Reference
#include <iomanip>
#include "emdata.h"
#include "io/all_imageio.h"
#include "ctf.h"
#include <iostream>
#include <memory>
#include <sys/stat.h>
Include dependency graph for emdata_io.cpp:

Go to the source code of this file.

Functions

ostream & operator<< (ostream &out, const EMData &obj)
 

Function Documentation

◆ operator<<()

ostream & operator<< ( ostream &  out,
const EMData obj 
)

Definition at line 442 of file emdata_io.cpp.

442 {
443 int nx = obj.get_xsize();
444 int ny = obj.get_ysize();
445 int nz = obj.get_zsize();
446 for (int iz = 0; iz < nz; iz++) {
447 out << "(z = " << iz << " slice)" << std::endl;
448 for (int ix = 0; ix < nx; ix++) {
449 for (int iy = 0; iy < ny; iy++) {
450 out << std::setiosflags(std::ios::fixed)
451 << std::setiosflags(std::ios_base::scientific)
452 << std::setw(12)
453 << std::setprecision(5) << obj(ix,iy,iz) << " ";
454 if (((iy+1) % 6) == 0) {
455 out << std::endl << " ";
456 }
457 }
458 out << std::endl;
459 }
460 }
461 return out;
462}