43 #include <visp/vpDiskGrabber.h>
50 : image_number(0), image_step(1), number_of_zero(0), useGenericName(false)
61 : image_number(0), image_step(1), number_of_zero(0), useGenericName(false)
68 if (strlen( generic_name ) >= FILENAME_MAX) {
70 "Not enough memory to intialize the generic name"));
73 strcpy(this->genericName, generic_name);
74 useGenericName =
true;
91 int step,
unsigned int noz,
93 : image_number(number), image_step(step), number_of_zero(noz), useGenericName(false)
175 char name[FILENAME_MAX] ;
178 sprintf(name,genericName,image_number) ;
180 sprintf(name,
"%s/%s%0*ld.%s",directory,base_name,number_of_zero,image_number,extension) ;
182 image_number += image_step ;
202 char name[FILENAME_MAX] ;
205 sprintf(name,genericName,image_number) ;
207 sprintf(name,
"%s/%s%0*ld.%s",directory,base_name,number_of_zero,image_number,extension) ;
209 image_number += image_step ;
230 char name[FILENAME_MAX] ;
233 sprintf(name,genericName,image_number) ;
235 sprintf(name,
"%s/%s%0*ld.%s",directory,base_name,number_of_zero,image_number,extension) ;
237 image_number += image_step ;
259 char name[FILENAME_MAX] ;
262 sprintf(name,genericName,img_number) ;
264 sprintf(name,
"%s/%s%0*ld.%s",directory,base_name,number_of_zero,img_number,extension) ;
285 char name[FILENAME_MAX] ;
288 sprintf(name,genericName,img_number) ;
290 sprintf(name,
"%s/%s%0*ld.%s",directory,base_name,number_of_zero,img_number,extension) ;
313 char name[FILENAME_MAX] ;
316 sprintf(name,genericName,img_number) ;
318 sprintf(name,
"%s/%s%0*ld.%s",directory,base_name,number_of_zero,img_number,extension) ;
357 sprintf(directory,
"%s", dir) ;
366 sprintf(base_name,
"%s", name) ;
375 sprintf(extension,
"%s", ext) ;
384 image_number = number ;
403 number_of_zero = noz ;
409 if (strlen( generic_name ) >= FILENAME_MAX) {
411 "Not enough memory to intialize the generic name"));
414 strcpy(this->genericName, generic_name) ;
415 useGenericName =
true;
unsigned int getWidth() const
void setBaseName(const char *name)
error that can be emited by ViSP classes.
void setDirectory(const char *dir)
static void readPFM(vpImage< float > &I, const char *filename)
void setNumberOfZero(unsigned int noz)
unsigned int height
Number of rows in the image.
void setImageNumber(long number)
void open(vpImage< unsigned char > &I)
void setExtension(const char *ext)
bool init
Set to true if the frame grabber has been initialized.
unsigned int getHeight() const
void acquire(vpImage< unsigned char > &I)
static void read(vpImage< unsigned char > &I, const char *filename)
unsigned int width
Number of columns in the image.
void setGenericName(const char *genericName)