39 #include <visp3/io/vpDiskGrabber.h>
46 : image_number(0), image_step(1), number_of_zero(0), useGenericName(false)
57 : image_number(0), image_step(1), number_of_zero(0), useGenericName(false)
64 if (strlen( generic_name ) >= FILENAME_MAX) {
66 "Not enough memory to intialize the generic name"));
69 strcpy(this->genericName, generic_name);
70 useGenericName =
true;
87 int step,
unsigned int noz,
89 : image_number(number), image_step(step), number_of_zero(noz), useGenericName(false)
171 char name[FILENAME_MAX] ;
174 sprintf(name,genericName,image_number) ;
176 sprintf(name,
"%s/%s%0*ld.%s",directory,base_name,number_of_zero,image_number,extension) ;
178 image_number += image_step ;
198 char name[FILENAME_MAX] ;
201 sprintf(name,genericName,image_number) ;
203 sprintf(name,
"%s/%s%0*ld.%s",directory,base_name,number_of_zero,image_number,extension) ;
205 image_number += image_step ;
226 char name[FILENAME_MAX] ;
229 sprintf(name,genericName,image_number) ;
231 sprintf(name,
"%s/%s%0*ld.%s",directory,base_name,number_of_zero,image_number,extension) ;
233 image_number += image_step ;
255 char name[FILENAME_MAX] ;
258 sprintf(name,genericName,img_number) ;
260 sprintf(name,
"%s/%s%0*ld.%s",directory,base_name,number_of_zero,img_number,extension) ;
281 char name[FILENAME_MAX] ;
284 sprintf(name,genericName,img_number) ;
286 sprintf(name,
"%s/%s%0*ld.%s",directory,base_name,number_of_zero,img_number,extension) ;
309 char name[FILENAME_MAX] ;
312 sprintf(name,genericName,img_number) ;
314 sprintf(name,
"%s/%s%0*ld.%s",directory,base_name,number_of_zero,img_number,extension) ;
353 sprintf(directory,
"%s", dir) ;
362 sprintf(base_name,
"%s", name) ;
371 sprintf(extension,
"%s", ext) ;
380 image_number = number ;
399 number_of_zero = noz ;
405 if (strlen( generic_name ) >= FILENAME_MAX) {
407 "Not enough memory to intialize the generic name"));
410 strcpy(this->genericName, generic_name) ;
411 useGenericName =
true;
unsigned int getWidth() const
void setBaseName(const char *name)
error that can be emited by ViSP classes.
void setDirectory(const char *dir)
void setNumberOfZero(unsigned int noz)
unsigned int height
Number of rows in the image.
void setImageNumber(long number)
void open(vpImage< unsigned char > &I)
static void readPFM(vpImage< float > &I, const std::string &filename)
void setExtension(const char *ext)
bool init
Set to true if the frame grabber has been initialized.
static void read(vpImage< unsigned char > &I, const std::string &filename)
unsigned int getHeight() const
void acquire(vpImage< unsigned char > &I)
unsigned int width
Number of columns in the image.
void setGenericName(const char *genericName)