Open
Conversation
Modify vpFileDataSource to support reading a KWA index. This is the first step in adding crude KWA support to WAMI Viewer. (Crude, because WAMI Viewer is incredibly wedded to having individual image files and, to some extent, to obtaining times and homographies separately from image data. A proper implementation would replace all that mess with a single "video" source that integrates everything, in order to provide a clean solution for a source like KWA where all of the metadata is tightly coupled with the image data.) The second step will be to implement a vtkVgBaseImageSource that reads a single frame from a KWA. (Unfortunately, this approach means that almost none of the existing KWA code can be used, except as cut-and-paste into the new image source.)
Extract the logic to read a single frame image from a KWA into a separate helper function. This will allow us to reuse the code (and also, to avoid needing to make vgIStream a public class) for the upcoming VTK KWA reader.
Implement a vtkVgBaseImageSource that can read a single frame from a KWA. Add this to the set of readers registered with WAMI Viewer. In conjunction with recent changes to vpFileDataSource, this allows WAMI Viewer to use a KWA as its image source. (However, while time stamps should be working, homographies are not currently supported. This might be implemented at some point in the future.)
Tweak text in WAMI Viewer project editor to more clearly indicate that a KWA is acceptable as a data source.
Make CanRead, GetShortDescription and GetLongDescription methods of vtkVgBaseImageSource const, because they really, really ought to be.
Create a class that presents the interface (at least, the bit that we care about) of a kwiver::vital::algo::image_io, but is implemented using vpImageSourceFactory and vtkVgBaseImageSource. This gives us something that can be used as a drop-in replacement for the image readers that feed KWIVER (embedded pipelines, track improvement), but uses the same (VTK-based) readers that WAMI Viewer uses internally. This is particularly important for the recently added KWA support, which relies on a kludged-up VTK reader to mangle "file names" into KWA frames (and thus, obviously, doesn't work with KWIVER's readers).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add ability to load KWA's to WAMI Viewer. These work as a sort of bastardized "image list" in conjunction with a reader that can load a single KWA frame given one of the specially formatted "file names".