-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate kwiver v2 #1818
base: master
Are you sure you want to change the base?
Integrate kwiver v2 #1818
Conversation
Removed parameters for format_config_block interface class. Added some back to derived class. Defining parameters in the interface will be special case requiring the use of a setter.
Update config using uncrustify --update-config -c .uncrustify.cfg and bringing the comments from the original file.
No need to include it everywhere with pluggable macros
Otherwise we get multiple definitions errors: vital/plugin_management/pluggable_macro_magic.h:41: multiple definition of `_test_opt_arg'; vital/algo/CMakeFiles/vital_algorithms.dir/algorithm.cxx.o:vital/plugin_management/pluggable_macro_magic .h:41: first defined here
Taken from https://github.com/Kitware/kwiver @7e4920796821476afb9be3b31b23791a1e1e76b6
algorithm.txx contains methods of the former (kwiver-v1) algorithm class that were using the interface name as a string
Taken from https://github.com/Kitware/kwiver @7e4920796821476afb9be3b31b23791a1e1e76b6
Taken from https://github.com/Kitware/kwiver @7e4920796821476afb9be3b31b23791a1e1e76b6
Taken from https://github.com/Kitware/kwiver @7e4920796821476afb9be3b31b23791a1e1e76b6
Brings the following from https://github.com/Kitware/kwiver @7e4920796821476afb9be3b31b23791a1e1e76b6 vital/any.h vital/exceptions.h vital/vital_types.h vital/types/color.h vital/types/geo_point.{cxx,h} vital/types/image.{cxx,h} vital/types/image_container.h vital/types/metadata.{cxx,h} vital/types/metadata_tags.h vital/types/metadata_traits.{cxx,h} vital/types/timestamp.{cxx,h} vital/types/metadata_map.h vital/types/video_raw_image.{cxx,h} vital/types/video_raw_metadata.{cxx,h} vital/types/video_settings.{cxx,h} vital/types/video_uninterpreted_data.{cxx,h} vital/util/visit.h
fixes: vision/kwiver-v2/kwiver-v2/vital/types/metadata.cxx:36:16: error: no match for ‘operator==’ (operand types are ‘const kwiver::vital::geo_polygon’ and ‘const kwiver ::vital::geo_polygon’) 36 | return lhs == rhs;
…er-v2 * commit 'f3ce9ab6b381cc44ebebad490701c6bb875d331e': Bring dump_klv
…e-kwiver-v2 * commit '95ccfcd11ac33c6046cfefeadcd4c0f08314afb1': Enable arrows/core applets
…ver-v2 * commit 'b18cacf70e7afbafce1c15ccb224f98a0fc38a58': Adapt dump_klv for new API
…grate-kwiver-v2 * commit '77f8b3dc07c347a80cf22f2d13b1da7f08cfdde8': cmake: add missing dependency for ffmpeg test
…egrate-kwiver-v2 * commit '7812ad62005505d3905755237328859c111d1064': compile: Add missing headers file in klv_util
…r-v2 * commit '91466d3e419322153ff5095f885d599855baac33': Add guide for importing kwiver algorithms
…wiver-v2 Ignore indentation changes. * commit 'ed09e8e86da1765c7bb076ee041ddd106d1b226b': Improve indentation in pluggable_macro_magic.h
…ate-kwiver-v2 * commit 'd45675ba7f5322a50cfcbb822b9e7a79e661a2c5': bring back //UNCRUST guard fix comment style in algorithm.{cxx,h}
…ver-v2 * commit 'cf9d4f14399b296cfe9cb514a5516b0b1192259f':
…kwiver-v2 * commit 'c2697c66ea52ee3e2d0555f1f48a11e1687e0727': vital_config.h: Add #define for method decorators
* commit '120dfbcf3c52c0082b0f79a1b8c7bdfa94003123': Bring rest of vital/types
…kwiver-v2 * commit '80a4b4ec830656b0355f844c15f6cb1c70ecd568': cmake: Update CMakeLists.txt for new files
…wiver-v2 * commit '4c0e5ae4bb93968934ba5c22f118cddd79ba7ab3': Bring dependencies of vital/types
…egrate-kwiver-v2 * commit 'a06f582bf3088f27729d4f08d730c02c316568b8': cmake: Update vital/types CMakeLists for new files
…e-kwiver-v2 * commit 'db38b3b1a1604cfcd65091268ec0a1e6652320b6': Add placeholders for moved files
…kwiver-v2 * commit '4a6a58c24327ed5067387c2bbabd16059019398d':
These changes had been done in `uncrustify` steps and ignored when merging. Apply their diffs.
* integrate-kwiver-v2-phase2: (175 commits) arrows/core/test: add missing link to `kwiver_algo_core` arrows/core: fix conflict resolution test_any_converter: resolve botched conflict resolution vital/algo: adapt for v2 vital: mask files not ported to v2 Add placeholders for moved files cmake: Update vital/types CMakeLists for new files Bring dependencies of vital/types cmake: Update CMakeLists.txt for new files Bring rest of vital/types vital_config.h: Add #define for method decorators sprokit: unignore the `dist` directory bring back //UNCRUST guard Improve indentation in pluggable_macro_magic.h Add guide for importing kwiver algorithms compile: Add missing headers file in klv_util cmake: add missing dependency for ffmpeg test Adapt dump_klv for new API Enable arrows/core applets Bring dump_klv ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of changes I needed to get this branch to configure on linux.
…on-adjustments FFmpeg corruption adjustments
* integrate-kwiver-v2-phase3: (177 commits) tools: fix botched CMake merge conflict cmake: remove duplicate `add_directory` arrows/core/test: add missing link to `kwiver_algo_core` arrows/core: fix conflict resolution test_any_converter: resolve botched conflict resolution vital/algo: adapt for v2 vital: mask files not ported to v2 Add placeholders for moved files cmake: Update vital/types CMakeLists for new files Bring dependencies of vital/types cmake: Update CMakeLists.txt for new files Bring rest of vital/types vital_config.h: Add #define for method decorators sprokit: unignore the `dist` directory bring back //UNCRUST guard Improve indentation in pluggable_macro_magic.h Add guide for importing kwiver algorithms compile: Add missing headers file in klv_util cmake: add missing dependency for ffmpeg test Adapt dump_klv for new API ...
bool write_remaining_columns() { return parent.c_write_remaining_columns; } | ||
bool write_enum_names() { return parent.c_write_enum_names; } | ||
std::string names_string() { return parent.c_column_names; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not define these functions as const
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed this and similar methods can be const
and just call the getter parent.get_write_enum_names
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is integration; further PRs to improve const-correctness (clang-tidy
can help here too) would be good.
std::vector< std::string > column_names; | ||
std::string overrides_string; | ||
std::string overrides_string() {return parent.c_column_overrides; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not define these functions as const
?
std::vector< std::string > column_overrides; | ||
uint64_t every_n_microseconds{ 0 }; | ||
uint64_t every_n_frames{ 0 }; | ||
uint64_t every_n_microseconds() { return parent.c_every_n_microseconds; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not define these functions as const
?
vital::frame_id_t c_start_at_frame() { return parent.c_start_at_frame; }; | ||
vital::frame_id_t c_stop_after_frame() { return parent.c_stop_after_frame;} ; | ||
vital::frame_id_t c_frame_skip() { return parent.c_output_nth_frame; }; | ||
double c_frame_rate() { return parent.c_frame_rate; }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not define these functions as const
?
|
||
// local state | ||
bool d_at_eov; | ||
|
||
// processing classes | ||
vital::algo::video_input_sptr d_video_input; | ||
vital::algo::video_input_sptr d_video_input() { return parent.c_video_input; }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not define this function as const
?
const std::string& unknown_stream_behavior() { return parent.c_unknown_stream_behavior; }; | ||
const std::string& filter_description() { return parent.c_filter_desc;}; | ||
uint64_t retain_klv_duration() { return parent.c_retain_klv_duration; }; | ||
bool cuda_enabled() { return parent.c_cuda_enabled;} ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not define this function as const
?
catch ( kv::no_such_configuration_value_exception const& ) | ||
{ | ||
std::ostringstream sstr; | ||
|
||
sstr << "\'" << key << "\'"; | ||
|
||
PyErr_SetString( PyExc_KeyError, sstr.str().c_str() ); | ||
throw py::error_already_set(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be worth considering simplifying the catch block by directly concatenating the string inside PyErr_SetString()?
catch (const kv::no_such_configuration_value_exception&)
{
PyErr_SetString(PyExc_KeyError, ("'" + key + "'").c_str());
throw py::error_already_set();
}
sstr << "\'" << key << "\'"; | ||
|
||
PyErr_SetString( PyExc_KeyError, sstr.str().c_str() ); | ||
throw py::error_already_set(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be worth considering simplifying the catch block by directly concatenating the string inside PyErr_SetString()?
catch (const kv::no_such_configuration_value_exception&)
{
PyErr_SetString(PyExc_KeyError, ("'" + key + "'").c_str());
throw py::error_already_set();
}
void | ||
config_set_value( kwiver::vital::config_block_sptr self, | ||
kwiver::vital::config_block_key_t const& key, | ||
kwiver::vital::config_block_key_t const& value ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible that there's a typo in the function signature? It seems that the parameter value should be of type kwiver::vital::config_block_value_t
/// | ||
/// @return Shared pointer to specified element. | ||
/// | ||
/// @throws std::out_of_range if position is now within the range of objects |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think here it should be not
instead of now
Things not brought over:
ffmpeg_video_input_clip
needs ported