remove im_iterate() uses
This commit is contained in:
parent
68fae1ab1f
commit
3a9f0d50fa
@ -15,6 +15,7 @@
|
|||||||
- im_vips2tiff() uses vips_sink() instead of threadgroup
|
- im_vips2tiff() uses vips_sink() instead of threadgroup
|
||||||
- strip out threadgroup
|
- strip out threadgroup
|
||||||
- add --enable-debug=xxx flag
|
- add --enable-debug=xxx flag
|
||||||
|
- im_iterate() -> vips_sink()
|
||||||
|
|
||||||
16/1/10 started 7.21.2
|
16/1/10 started 7.21.2
|
||||||
- "invalidate" is careful to keep images alive, so invalidate callbacks can do
|
- "invalidate" is careful to keep images alive, so invalidate callbacks can do
|
||||||
|
3
TODO
3
TODO
@ -1,7 +1,4 @@
|
|||||||
|
|
||||||
- im_iterate() is deprecated: change to vips_sink() throughout
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- expose more of the tone funcs in nip2
|
- expose more of the tone funcs in nip2
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ typedef struct _Wrapscan {
|
|||||||
} Wrapscan;
|
} Wrapscan;
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
wrapscan_start( IMAGE *in, void *a, void *b )
|
wrapscan_start( VipsImage *in, void *a, void *b )
|
||||||
{
|
{
|
||||||
Wrapscan *wrapscan = (Wrapscan *) a;
|
Wrapscan *wrapscan = (Wrapscan *) a;
|
||||||
|
|
||||||
@ -122,12 +122,12 @@ wrapscan_scan( REGION *reg, void *seq, void *a, void *b )
|
|||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Like im_iterate(), but the scan function works a line at a time, like
|
/* Like vips_sink(), but the scan function works a line at a time, like
|
||||||
* im_wrap*(). Shared with im_min(), im_deviate() etc.
|
* im_wrap*(). Shared with im_min(), im_deviate() etc.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
im__wrapscan( IMAGE *in,
|
im__wrapscan( VipsImage *in,
|
||||||
im_start_fn start, im__wrapscan_fn scan, im_stop_fn stop,
|
VipsStart start, im__wrapscan_fn scan, VipsStop stop,
|
||||||
void *a, void *b )
|
void *a, void *b )
|
||||||
{
|
{
|
||||||
Wrapscan wrapscan;
|
Wrapscan wrapscan;
|
||||||
@ -139,7 +139,7 @@ im__wrapscan( IMAGE *in,
|
|||||||
wrapscan.a = a;
|
wrapscan.a = a;
|
||||||
wrapscan.b = b;
|
wrapscan.b = b;
|
||||||
|
|
||||||
return( im_iterate( in,
|
return( vips_sink( in,
|
||||||
wrapscan_start, wrapscan_scan, wrapscan_stop,
|
wrapscan_start, wrapscan_scan, wrapscan_stop,
|
||||||
&wrapscan, NULL ) );
|
&wrapscan, NULL ) );
|
||||||
}
|
}
|
||||||
|
@ -222,7 +222,7 @@ im_maxpos( IMAGE *in, int *xpos, int *ypos, double *out )
|
|||||||
if( vips_bandfmt_iscomplex( in->BandFmt ) )
|
if( vips_bandfmt_iscomplex( in->BandFmt ) )
|
||||||
global_maxpos->max *= global_maxpos->max;
|
global_maxpos->max *= global_maxpos->max;
|
||||||
|
|
||||||
if( im_iterate( in, maxpos_start, maxpos_scan, maxpos_stop,
|
if( vips_sink( in, maxpos_start, maxpos_scan, maxpos_stop,
|
||||||
in, global_maxpos ) )
|
in, global_maxpos ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
|
||||||
|
@ -238,7 +238,7 @@ im_maxpos_avg( IMAGE *in, double *xpos, double *ypos, double *out )
|
|||||||
if( vips_bandfmt_iscomplex( in->BandFmt ) )
|
if( vips_bandfmt_iscomplex( in->BandFmt ) )
|
||||||
global_maxposavg->max *= global_maxposavg->max;
|
global_maxposavg->max *= global_maxposavg->max;
|
||||||
|
|
||||||
if( im_iterate( in, maxposavg_start, maxposavg_scan, maxposavg_stop,
|
if( vips_sink( in, maxposavg_start, maxposavg_scan, maxposavg_stop,
|
||||||
in, global_maxposavg ) )
|
in, global_maxposavg ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ int im_maxpos_vec( IMAGE *im, int *xpos, int *ypos, double *maxima, int n ){
|
|||||||
|
|
||||||
maxpos_list_init( &master_list, n );
|
maxpos_list_init( &master_list, n );
|
||||||
|
|
||||||
result= im_iterate( im, maxpos_vec_start, maxpos_vec_scan, maxpos_vec_stop, &n, &master_list );
|
result= vips_sink( im, maxpos_vec_start, maxpos_vec_scan, maxpos_vec_stop, &n, &master_list );
|
||||||
|
|
||||||
im_free( pointers );
|
im_free( pointers );
|
||||||
|
|
||||||
@ -208,7 +208,7 @@ int im_minpos_vec( IMAGE *im, int *xpos, int *ypos, double *minima, int n ){
|
|||||||
|
|
||||||
minpos_list_init( &master_list, n );
|
minpos_list_init( &master_list, n );
|
||||||
|
|
||||||
result= im_iterate( im, minpos_vec_start, minpos_vec_scan, minpos_vec_stop, &n, &master_list );
|
result= vips_sink( im, minpos_vec_start, minpos_vec_scan, minpos_vec_stop, &n, &master_list );
|
||||||
|
|
||||||
im_free( pointers );
|
im_free( pointers );
|
||||||
|
|
||||||
|
@ -222,7 +222,7 @@ im_minpos( IMAGE *in, int *xpos, int *ypos, double *out )
|
|||||||
if( vips_bandfmt_iscomplex( in->BandFmt ) )
|
if( vips_bandfmt_iscomplex( in->BandFmt ) )
|
||||||
global_minpos->min *= global_minpos->min;
|
global_minpos->min *= global_minpos->min;
|
||||||
|
|
||||||
if( im_iterate( in, minpos_start, minpos_scan, minpos_stop,
|
if( vips_sink( in, minpos_start, minpos_scan, minpos_stop,
|
||||||
in, global_minpos ) )
|
in, global_minpos ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
|
||||||
|
@ -347,7 +347,7 @@ im_histgr( IMAGE *in, IMAGE *out, int bandno )
|
|||||||
|
|
||||||
/* Accumulate data.
|
/* Accumulate data.
|
||||||
*/
|
*/
|
||||||
if( im_iterate( in,
|
if( vips_sink( in,
|
||||||
build_subhist, scanfn, merge_subhist, mhist, NULL ) )
|
build_subhist, scanfn, merge_subhist, mhist, NULL ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
|
||||||
|
@ -360,7 +360,7 @@ im_hist_indexed( IMAGE *index, IMAGE *value, IMAGE *out )
|
|||||||
|
|
||||||
/* Accumulate data.
|
/* Accumulate data.
|
||||||
*/
|
*/
|
||||||
if( im_iterate( index,
|
if( vips_sink( index,
|
||||||
hist_start, scanfn, hist_stop, mhist, NULL ) ||
|
hist_start, scanfn, hist_stop, mhist, NULL ) ||
|
||||||
hist_write( out, mhist ) ) {
|
hist_write( out, mhist ) ) {
|
||||||
hist_free( mhist );
|
hist_free( mhist );
|
||||||
|
@ -239,7 +239,7 @@ im_histnD( IMAGE *in, IMAGE *out, int bins )
|
|||||||
|
|
||||||
/* Accumulate data.
|
/* Accumulate data.
|
||||||
*/
|
*/
|
||||||
if( im_iterate( in,
|
if( vips_sink( in,
|
||||||
build_subhist, find_hist, merge_subhist, mhist, NULL ) )
|
build_subhist, find_hist, merge_subhist, mhist, NULL ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
|
||||||
|
@ -288,7 +288,7 @@ im_project( IMAGE *in, IMAGE *hout, IMAGE *vout )
|
|||||||
|
|
||||||
/* Accumulate data.
|
/* Accumulate data.
|
||||||
*/
|
*/
|
||||||
if( im_iterate( in,
|
if( vips_sink( in,
|
||||||
project_new_sub, project_scan, project_merge, mproject, NULL ) )
|
project_new_sub, project_scan, project_merge, mproject, NULL ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user