mirror of
https://github.com/eddyem/fitsview-hartmann.git
synced 2025-12-06 02:35:18 +03:00
fixed compile bugs in non-debug mode
This commit is contained in:
parent
680dba91dd
commit
21955bbb57
@ -20,6 +20,7 @@
|
|||||||
#include "fitsview.h"
|
#include "fitsview.h"
|
||||||
#include "gtk.h"
|
#include "gtk.h"
|
||||||
#include "CUtools.h"
|
#include "CUtools.h"
|
||||||
|
#include "imtools.h"
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <fftw3.h>
|
#include <fftw3.h>
|
||||||
|
|
||||||
|
|||||||
@ -168,10 +168,12 @@ gboolean writefits(char *filename, IMAGE *image){
|
|||||||
}
|
}
|
||||||
gtk_tree_path_free(path);
|
gtk_tree_path_free(path);
|
||||||
}
|
}
|
||||||
|
#ifdef EBUG
|
||||||
GLfloat min, wd;
|
GLfloat min, wd;
|
||||||
min = image->stat.min;
|
min = image->stat.min;
|
||||||
wd = image->stat.max - min;
|
wd = image->stat.max - min;
|
||||||
DBG("min = %f, wd = %f", min, wd);
|
DBG("min = %f, wd = %f", min, wd);
|
||||||
|
#endif
|
||||||
/* int i,j;
|
/* int i,j;
|
||||||
GLfloat *newdata = malloc(sz*sizeof(GLfloat));
|
GLfloat *newdata = malloc(sz*sizeof(GLfloat));
|
||||||
GLfloat *ptro = newdata, *ptri = image->data;
|
GLfloat *ptro = newdata, *ptri = image->data;
|
||||||
@ -355,7 +357,7 @@ gboolean readfits(gchar *filename, IMAGE *image){
|
|||||||
|
|
||||||
TRYFITS(fits_read_img, fp, TFLOAT, 1, sz, &nullval, image->data, &stat);
|
TRYFITS(fits_read_img, fp, TFLOAT, 1, sz, &nullval, image->data, &stat);
|
||||||
GLfloat *ptr = image->data;
|
GLfloat *ptr = image->data;
|
||||||
GLfloat min, max, wd;
|
GLfloat min, max;
|
||||||
min = 1e6; max = 0.;
|
min = 1e6; max = 0.;
|
||||||
for(i=0; i<h; i++)
|
for(i=0; i<h; i++)
|
||||||
for(j=0; j<w; j++, ptr++){
|
for(j=0; j<w; j++, ptr++){
|
||||||
@ -363,8 +365,7 @@ gboolean readfits(gchar *filename, IMAGE *image){
|
|||||||
if(tmp > max) max = tmp;
|
if(tmp > max) max = tmp;
|
||||||
else if(tmp < min) min = tmp;
|
else if(tmp < min) min = tmp;
|
||||||
}
|
}
|
||||||
wd = max - min;
|
DBG("min = %f, wd = %f", min, max-min);
|
||||||
DBG("min = %f, wd = %f", min, wd);
|
|
||||||
image->stat.max = max;
|
image->stat.max = max;
|
||||||
image->stat.min = min;
|
image->stat.min = min;
|
||||||
// histogram isn't initialized yet
|
// histogram isn't initialized yet
|
||||||
|
|||||||
@ -162,7 +162,7 @@ gboolean get_circle_center(Window *window, BOX *box, PIX *pix, Coordinates *crds
|
|||||||
int N = 0, X0, Y0, X, Y, n;
|
int N = 0, X0, Y0, X, Y, n;
|
||||||
l_uint32 *pixdata, *pixptr;
|
l_uint32 *pixdata, *pixptr;
|
||||||
l_int32 w, h, d, wpl, sz, i, x, y;
|
l_int32 w, h, d, wpl, sz, i, x, y;
|
||||||
double Xcenter, Ycenter, Radius, xx, yy, Intens, X2, Y2;
|
double Xcenter, Ycenter, xx, yy, Intens, X2, Y2;
|
||||||
GLfloat *data;
|
GLfloat *data;
|
||||||
if(!check_box(window, box, &X0, &Y0, &X, &Y)) return FALSE;
|
if(!check_box(window, box, &X0, &Y0, &X, &Y)) return FALSE;
|
||||||
if(!(pix && crds)) return FALSE;
|
if(!(pix && crds)) return FALSE;
|
||||||
@ -177,8 +177,7 @@ gboolean get_circle_center(Window *window, BOX *box, PIX *pix, Coordinates *crds
|
|||||||
n = 0;
|
n = 0;
|
||||||
Xcenter = (double)(X0 + X) / 2.;
|
Xcenter = (double)(X0 + X) / 2.;
|
||||||
Ycenter = (double)(Y0 + Y) / 2.;
|
Ycenter = (double)(Y0 + Y) / 2.;
|
||||||
Radius = (double)(w + h) / 4.;
|
DBG("x0=%g, y0=%g, r0=%g, N=%d", Xcenter, Ycenter, (double)(w + h) / 4., N);
|
||||||
DBG("x0=%g, y0=%g, r0=%g, N=%d", Xcenter, Ycenter, Radius, N);
|
|
||||||
Xcenter = Ycenter = X2 = Y2 = Intens = 0.;
|
Xcenter = Ycenter = X2 = Y2 = Intens = 0.;
|
||||||
AxisX = 0.; AxisY = (double)HT;
|
AxisX = 0.; AxisY = (double)HT;
|
||||||
for(y = 0; y < h; y++){
|
for(y = 0; y < h; y++){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user