Besides the RST types, a collection of RSB converter s from data type s found in several common libraries like e.g. OpenCV to and from RST types is maintained. These converter s can be used inside interested client projects.
Note
Currently, only C++ converter s are available. Hence, the following description only focus on C++.
The result will be a shared library containing the converter s which can be used by client projects.
In order to use the provided converter s in projects based on CMake, first find the rst-converters library using the following code:
FIND_PACKAGE(rst-converters REQUIRED)
INCLUDE_DIRECTORIES(BEFORE SYSTEM ${RST_CONVERTERS_INCLUDE_DIRS})
Afterwards you can create a usual target in CMake and finally link it against the rst-converters library:
ADD_EXECUTABLE(tester tester.cpp)
TARGET_LINK_LIBRARIES(tester ${RST_CONVERTERS_LIBRARIES})
In order to use the available converter s in the client C++ code, the following example shall provide a first rough idea:
#include <rst/converters/opencv/IplImageConverter.h>
int main() {
rsb::converter::Converter<std::string>::Ptr imageConverter(
new rst::converters::opencv::IplImageConverter());
rsb::converter::stringConverterRepository()->registerConverter(imageConverter);
// the converter can now be used in RSB
}