30 error_show(
"img_rotate_by_pi", __FILE__, __LINE__);
31 cerr <<
"Error: Size of image is less than one!" << endl;
38 unsigned long i, j, c, x, y, z, n, oldx, oldy, oldz;
41 cout <<
"Rotating an image by PI" << endl << endl;
43 for ( i=n=0; n<p->
images(); n++ ) {
44 for ( z=0; z<p->
sizeZ(); z++ ) {
45 oldz = p->
sizeZ() - z - 1;
46 for ( y=0; y<p->
sizeY(); y++ ) {
47 oldy = p->
sizeY() - y - 1;
48 for ( x=0; x<p->
sizeX(); x++ ) {
49 oldx = p->
sizeX() - x - 1;
51 for ( c=0; c<p->
channels(); c++, i++, j++ ) prot->
set(i, (*p)[j]);
Bimage * img_rotate_by_pi(Bimage *p)
Rotates an image by pi.
void sizeX(unsigned long nx)
Header file for general utilities.
int error_show(const char *message, const char *file, int line)
Displays the error with file and line reference.
General image parameter class.
unsigned char * data_alloc()
void set(unsigned long j, double v)
Sets a single value at the given index.
unsigned char * data_pointer()
void sizeZ(unsigned long nz)
Header file for 2D and 3D image I/O.
void sizeY(unsigned long ny)