From 91141936ae3274368bf2d2440ab86fbec7628560 Mon Sep 17 00:00:00 2001 From: William Joye Date: Thu, 14 Mar 2019 16:59:16 -0400 Subject: thread contour --- tksao/frame/fitsanalysis.C | 19 +++++++++++++------ tksao/frame/fitsimage.h | 7 +++++-- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/tksao/frame/fitsanalysis.C b/tksao/frame/fitsanalysis.C index 30a02df..45e14ba 100644 --- a/tksao/frame/fitsanalysis.C +++ b/tksao/frame/fitsanalysis.C @@ -17,9 +17,12 @@ void FitsImage::analysis(int which, pthread_t* thread, t_smooth_arg* targ) targ->kernel =NULL; targ->src =NULL; targ->dest =NULL; + targ->xmin =0; + targ->xmax =0; + targ->ymin =0; + targ->ymax =0; targ->width =0; - targ->height =0; - targ->k =0; + targ->r =0; if (manageAnalysis_) { if (analysis_) @@ -52,8 +55,8 @@ void FitsImage::analysis(int which, pthread_t* thread, t_smooth_arg* targ) void* convolveThread(void* vv) { t_smooth_arg* tt = (t_smooth_arg*)vv; - convolve(tt->kernel, tt->src, tt->dest, 0, 0, tt->width, tt->height, - tt->width, tt->k); + convolve(tt->kernel, tt->src, tt->dest, + tt->xmin, tt->ymin, tt->xmax, tt->ymax, tt->width, tt->r); return NULL; } @@ -67,6 +70,7 @@ void FitsImage::smooth(pthread_t* thread, t_smooth_arg* targ) int width = analysis_->head()->naxis(0); int height = analysis_->head()->naxis(1); + FitsBound* params = getDataParams(context_->secMode()); // src double* src = new double[width*height]; @@ -103,9 +107,12 @@ void FitsImage::smooth(pthread_t* thread, t_smooth_arg* targ) targ->kernel = kernel; targ->src = src; targ->dest = dest; + targ->xmin = params->xmin; + targ->xmax = params->xmax; + targ->ymin = params->ymin; + targ->ymax = params->ymax; targ->width = width; - targ->height = height; - targ->k = r; + targ->r = r; int result = pthread_create(thread, NULL, convolveThread, targ); if (result) diff --git a/tksao/frame/fitsimage.h b/tksao/frame/fitsimage.h index 19445b8..ec95573 100644 --- a/tksao/frame/fitsimage.h +++ b/tksao/frame/fitsimage.h @@ -21,9 +21,12 @@ typedef struct { double* kernel; double* src; double* dest; + int xmin; + int ymin; + int xmax; + int ymax; int width; - int height; - int k; + int r; } t_smooth_arg; typedef struct { -- cgit v0.12