DataMedSci / yagit

The gamma index calculation library for radiation dose DICOM images
https://datamedsci.github.io/yagit/
GNU General Public License v3.0
2 stars 4 forks source link

MetaImage support #53

Closed michal367 closed 1 year ago

michal367 commented 1 year ago

Reading and writing to MetaImage file (.mha)

reviewpad[bot] commented 1 year ago

AI-Generated Summary: This pull request introduces a new feature to write MetaImage files. The changes include:

  1. Added a new file, DataWriter.hpp, that defines the writeToMetaImage function to write image data to a MetaImage file (.mha).
  2. Implemented the writeToMetaImage function in DataWriter.cpp.
  3. Added the necessary include statements in yagit.hpp to use the new writeToMetaImage function.
  4. Modified DataReader.hpp to change the parameter name from 'file' to 'filepath'.
  5. Updated the .gitignore file to ignore MetaImage and raw files.
  6. Updated CMakeLists.txt to include the new DataWriter.cpp in the project.
  7. Updated bar.bat to run various test executables.
  8. Updated the examples (gamma25D.cpp, gamma2D.cpp, and gamma3DInterp.cpp) to save gamma indices to MetaImage files.
  9. Added a temporary test file, testWriter.cpp, for testing purposes.

There are a total of 186 insertions and 13 deletions in this patch.

grzanka commented 1 year ago

@michal367 include in the README description how to run the examples, including metaimage

reviewpad[bot] commented 1 year ago

Reviewpad Report

:bangbang: Errors

:warning: Warnings

grzanka commented 1 year ago

During build I've got this warning:

[ 57%] Building CXX object CMakeFiles/yagit.dir/src/DataReader.cpp.o
/home/grzanka/workspace/gi-yagit/new/src/DataReader.cpp: In function ‘yagit::ImageData yagit::DataReader::readMetaImage(const std::string&, bool)’:
/home/grzanka/workspace/gi-yagit/new/src/DataReader.cpp:526:18: warning: comparison of integer expressions of different signedness: ‘std::streamsize’ {aka ‘long int’} and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
  526 |     if(bytesRead != bytes){
      |        ~~~~~~~~~~^~~~~~~~
reviewpad[bot] commented 1 year ago

📈 Pull Request Metrics

💻 Coding Time: 16 days 🛻 Pickup Time: 5 days 👀 Review Time: 1 minute