X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FcreaImageIOUltrasonixImageReader.cpp;h=2b9d783838ec869cb5b8eaaa1ee5749fe5b76dcd;hb=3213e0d7adb70f52d723a5b7065f4780b6c9e451;hp=978bb03ec4bd0d89c7134fce65e7c735aac1b485;hpb=bf3660569b1baa8be10fc708f595efc66afe3334;p=creaImageIO.git diff --git a/src/creaImageIOUltrasonixImageReader.cpp b/src/creaImageIOUltrasonixImageReader.cpp index 978bb03..2b9d783 100644 --- a/src/creaImageIOUltrasonixImageReader.cpp +++ b/src/creaImageIOUltrasonixImageReader.cpp @@ -55,7 +55,7 @@ namespace creaImageIO //===================================================================== 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) @@ -77,7 +77,7 @@ namespace creaImageIO 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);