diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2019-03-14 20:59:16 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2019-03-14 20:59:16 (GMT) |
commit | 91141936ae3274368bf2d2440ab86fbec7628560 (patch) | |
tree | ed7b471a7be79251c824caa0a35d3e98ca0a17d8 /tksao/frame | |
parent | a3f950cb431e6c78f61e4f83b6a5df5dee9748f7 (diff) | |
download | blt-91141936ae3274368bf2d2440ab86fbec7628560.zip blt-91141936ae3274368bf2d2440ab86fbec7628560.tar.gz blt-91141936ae3274368bf2d2440ab86fbec7628560.tar.bz2 |
thread contour
Diffstat (limited to 'tksao/frame')
-rw-r--r-- | tksao/frame/fitsanalysis.C | 19 | ||||
-rw-r--r-- | 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 { |