This repository has been archived by the owner on Jul 14, 2022. It is now read-only.
Add ability to add comments to png images. #212
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I added the ability to add comments to png images. The comments are visible in XV.
I added the ability to store comments to the built in PNGEncoder. I added 2 new Encode methods with an extra argument containing the comments. The comments consist of a key and a string. I went with a vector of strings. The number of strings needs to be a multiple of 2. Right now the existing Encode methods still need to exist. Ascent could be modified to use only the new ones.
I removed an unnecessary #include PNGEncoder.h from Renderer and ScalarRenderer since they weren't necessary.
I added Set/GetComments to Render as well as logic to pass them to PNGEncoder.
For compositor/Image, I added another Save method that took the comments in addition to the file name. This seemed like the more natural way to do it for that class.
I've tested this with Ascent running the lulesh proxie in serial. This hasn't been tested with other proxies or using Rover or in parallel.
Here is an image from the resulting file showing the comment in XV.
Since this is my first commit to vtk-h/ascent, I'm expecting a fair number of requests for changes.