//=====================================================================
bool UltrasonixImageReader::CanRead(const std::string& filename)
{
- long size;
+ long size = -1;
bool ok = false;
FILE *Ultrasonix_file=fopen(filename.c_str(), "rb");
if (Ultrasonix_file)
size = (ftell(Ultrasonix_file) - HEADER_SIZE * sizeof(int)) / sizeof(int);
// check if the data size corresponds to the dimensions of the images
- if (size == h.width * h.height * h.frame)
+ if (size == h.width * h.height * h.frame )
ok = true;
fclose(Ultrasonix_file);