diff --git a/czi-format/czi-parser/image/image_matrix.cpp b/czi-format/czi-parser/image/image_matrix.cpp index 9453ed017dd05d8f6e71e40b5752e712b93b9443..db630c4ac6d94f6fe8cf7aa66d5e434ef78118c5 100644 --- a/czi-format/czi-parser/image/image_matrix.cpp +++ b/czi-format/czi-parser/image/image_matrix.cpp @@ -142,6 +142,7 @@ ImageMatrix::ImageMatrix(const uint width, const uint height, const PixelType pi ImageMatrix::~ImageMatrix() { + printf("ImageMatrix destructor...\n"); for (size_t i = 0; i < data.size(); i++) { if (data[i]) @@ -226,13 +227,13 @@ void ImageMatrix::save_as_ppm(std::string baseFileName) const void ImageMatrix::fill(BasePixel *px) { - for(size_t i = 0; i < data.size(); i++) + for (size_t i = 0; i < data.size(); i++) data[i] = px; } ImageMatrix ImageMatrix::create_difference_matrix(const ImageMatrix &other) { - always_assert(rowCount == other.rows() && colCount == other.cols() && pixelType() == other.pixel_type()); + always_assert(rowCount == other.rows() && colCount == other.cols() && pixelType == other.pixel_type()); ImageMatrix diff(colCount, rowCount, PixelType_Gray8); diff.fill(new Gray8Pixel(0)); @@ -241,7 +242,7 @@ ImageMatrix ImageMatrix::create_difference_matrix(const ImageMatrix &other) size_t size = this->data.size(); ulong diffCounter = 0; - for(size_t i = 0; i < size; i++) + for (size_t i = 0; i < size; i++) { if (!(this->data[i]->equals(other.get(size)))) { @@ -252,6 +253,6 @@ ImageMatrix ImageMatrix::create_difference_matrix(const ImageMatrix &other) float differentPercentage = (float)(diffCounter) / (float)(size); printf("Difference between images: %f\n", differentPercentage); - + return diff; } \ No newline at end of file