convert remaining layer variables to level

For consistency with openslide2vips.c.
This commit is contained in:
Benjamin Gilbert 2012-04-11 12:41:15 -04:00
parent 7ef00a3d7e
commit d6e16adcc7
2 changed files with 9 additions and 7 deletions

View File

@ -36,9 +36,9 @@ extern "C" {
int vips__openslide_isslide( const char *filename ); int vips__openslide_isslide( const char *filename );
int vips__openslide_read_header( const char *filename, VipsImage *out, int vips__openslide_read_header( const char *filename, VipsImage *out,
int layer, char *associated ); int level, char *associated );
int vips__openslide_read( const char *filename, VipsImage *out, int vips__openslide_read( const char *filename, VipsImage *out,
int layer ); int level );
int vips__openslide_read_associated( const char *filename, VipsImage *out, int vips__openslide_read_associated( const char *filename, VipsImage *out,
const char *associated ); const char *associated );

View File

@ -4,6 +4,8 @@
* - from openslideload.c * - from openslideload.c
* 28/2/12 * 28/2/12
* - convert "layer" to "level" where externally visible * - convert "layer" to "level" where externally visible
* 11/4/12
* - convert remaining uses of "layer" to "level"
*/ */
/* /*
@ -60,9 +62,9 @@ typedef struct _VipsForeignLoadOpenslide {
*/ */
char *filename; char *filename;
/* Load this layer. /* Load this level.
*/ */
int layer; int level;
/* Load this associated image. /* Load this associated image.
*/ */
@ -103,7 +105,7 @@ vips_foreign_load_openslide_header( VipsForeignLoad *load )
VipsForeignLoadOpenslide *openslide = (VipsForeignLoadOpenslide *) load; VipsForeignLoadOpenslide *openslide = (VipsForeignLoadOpenslide *) load;
if( vips__openslide_read_header( openslide->filename, load->out, if( vips__openslide_read_header( openslide->filename, load->out,
openslide->layer, openslide->associated ) ) openslide->level, openslide->associated ) )
return( -1 ); return( -1 );
return( 0 ); return( 0 );
@ -116,7 +118,7 @@ vips_foreign_load_openslide_load( VipsForeignLoad *load )
if( !openslide->associated ) { if( !openslide->associated ) {
if( vips__openslide_read( openslide->filename, load->real, if( vips__openslide_read( openslide->filename, load->real,
openslide->layer ) ) openslide->level ) )
return( -1 ); return( -1 );
} }
else { else {
@ -183,7 +185,7 @@ vips_foreign_load_openslide_class_init( VipsForeignLoadOpenslideClass *class )
_( "Level" ), _( "Level" ),
_( "Load this level from the file" ), _( "Load this level from the file" ),
VIPS_ARGUMENT_OPTIONAL_INPUT, VIPS_ARGUMENT_OPTIONAL_INPUT,
G_STRUCT_OFFSET( VipsForeignLoadOpenslide, layer ), G_STRUCT_OFFSET( VipsForeignLoadOpenslide, level ),
0, 100000, 0 ); 0, 100000, 0 );
VIPS_ARG_STRING( class, "associated", 11, VIPS_ARG_STRING( class, "associated", 11,