From 2e425629943246bd4105607e1b697ef3fd91e218 Mon Sep 17 00:00:00 2001 From: theazgra <theazgra@gmail.com> Date: Sat, 9 Feb 2019 08:11:00 +0100 Subject: [PATCH] Destructor print. --- czi-format/czi-parser/image/image_matrix.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/czi-format/czi-parser/image/image_matrix.cpp b/czi-format/czi-parser/image/image_matrix.cpp index 9453ed0..db630c4 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 -- GitLab