Skip to content

[io][rasterimagereader] Add a method to write a modified image file

Ned Coltman requested to merge feature/rewritepbm into master

What this MR does / why does DuMux need it:

This adds a method to modify or create a new Image file (e.g. .pbm).

As an example, the following: one runs a series of calculations based on an image. During preprocessing, the image is altered slightly to remove disconnected pixels, or other changes. In order to reproduce the calculations, the altered image is much more useful than the original image. This would allow one to write out the altered/processed image to an image file for further use.

Notes for the reviewer

This is tested using altered images made by some preprocessing methods in an dumux-appl repo that I have been working in. I'm not sure if those processing methods have a place in dumux. I could add some dummy change in the unit test here if that would be better.

It seems as if there is some preprocessing done in !3160 to find disconnected pixels. This would be a good example, although I don't fully understand the processing done there.

Before you request a review from someone, make sure to revise the following points:

  • does the new code follow the style guide?
  • do the test pipelines pass? (see guide on how to run pipelines for a merge request)
  • is the code you changed and/or the new code you wrote covered in the test suite? (if not, extend the existing tests or write new ones)
  • does your change affect public interfaces or behavior, or, does it introduce a new feature? If so, document the change in
  • is the list of the header includes complete? ("include what you use")
  • all files have to end with a \n character. Make sure there is no \ No newline at end of file comment in "Changes" of this MR.
Edited by Ned Coltman

Merge request reports