Difference between revisions of "Documentation/Nightly/Extensions/BlendVectorVolumes"
(2 intermediate revisions by the same user not shown) | |||
Line 24: | Line 24: | ||
{{documentation/{{documentation/version}}/module-section|Module Description}} | {{documentation/{{documentation/version}}/module-section|Module Description}} | ||
− | This is a CLI module that depends on the SlicerOpenCV extension, providing a way to blend two vector volumes together. | + | This is a CLI module that depends on the [[Documentation/{{documentation/version}}/Extensions/SlicerOpenCV|SlicerOpenCV extension]], providing a way to blend two vector volumes together. It uses the OpenCV function [http://docs.opencv.org/3.1.0/d2/de8/group__core__array.html#gafafb2513349db3bcff51f54ee5592a19 addWeighted]. |
<!-- ---------------------------- --> | <!-- ---------------------------- --> | ||
{{documentation/{{documentation/version}}/module-section|Use Cases}} | {{documentation/{{documentation/version}}/module-section|Use Cases}} | ||
− | When loading in RGB files, they are loaded as vector volumes in Slicer. Use this module to blend them together. | + | When loading in RGB files, they are loaded as vector volumes in Slicer. Use this module to blend them together if they have the same dimensions. |
<!-- ---------------------------- --> | <!-- ---------------------------- --> | ||
Line 44: | Line 44: | ||
* Gamma: A double value that is added to the weighted blend, used to increase or decrease intensity. | * Gamma: A double value that is added to the weighted blend, used to increase or decrease intensity. | ||
* First Input Volume: First input vector volume | * First Input Volume: First input vector volume | ||
− | * Second Input Volume: Second input vector volume | + | * Second Input Volume: Second input vector volume, must have the same dimensions as the first input volume. |
* Output Volume: Output vector volume, holding the blending of the two input volumes, Can be a newly created vector volume. | * Output Volume: Output vector volume, holding the blending of the two input volumes, Can be a newly created vector volume. | ||
|} | |} | ||
Line 51: | Line 51: | ||
{{documentation/{{documentation/version}}/module-section|Similar Modules}} | {{documentation/{{documentation/version}}/module-section|Similar Modules}} | ||
− | * The [https://github.com/SBU-BMI/SlicerPathology Slicer Pathology] extension also uses the SlicerOpenCV extension | + | * The [https://github.com/SBU-BMI/SlicerPathology Slicer Pathology] extension also uses the [[Documentation/{{documentation/version}}/Extensions/SlicerOpenCV|SlicerOpenCV extension]]. |
<!-- ---------------------------- --> | <!-- ---------------------------- --> | ||
{{documentation/{{documentation/version}}/module-section|References}} | {{documentation/{{documentation/version}}/module-section|References}} | ||
− | * Quantitative Image Informatics for Cancer Research (QIICR) http:// | + | * [http://qiicr.org Quantitative Image Informatics for Cancer Research (QIICR)] |
− | + | * [http://opencv.org Open Source Computer Vision] | |
− | + | ** [http://docs.opencv.org/3.1.0/d2/de8/group__core__array.html#gafafb2513349db3bcff51f54ee5592a19 addWeighted] documentation for version 3.1 | |
<!-- ---------------------------- --> | <!-- ---------------------------- --> | ||
Line 63: | Line 63: | ||
{{documentation/{{documentation/version}}/module-developerinfo}} | {{documentation/{{documentation/version}}/module-developerinfo}} | ||
− | To depend on the OpenCV provided by SlicerOpenCV, in the CLI's CMakeLists.txt file define OpenCV_DIR by finding the package that SlicerOpenCV provided: | + | To depend on the OpenCV provided by the [[Documentation/{{documentation/version}}/Extensions/SlicerOpenCV|SlicerOpenCV]] extension, in the CLI's CMakeLists.txt file define OpenCV_DIR by finding the package that SlicerOpenCV provided: |
find_package(OpenCV 3.1 REQUIRED) | find_package(OpenCV 3.1 REQUIRED) | ||
* The header include path is defined as: | * The header include path is defined as: | ||
Line 71: | Line 71: | ||
[[Documentation/{{documentation/version}}/Extensions/OpenCVExample|OpenCVExample]] provides some more information about writing an extension that includes modules that depend on OpenCV | [[Documentation/{{documentation/version}}/Extensions/OpenCVExample|OpenCVExample]] provides some more information about writing an extension that includes modules that depend on OpenCV | ||
+ | |||
+ | The images are read in using the opencv imread method. The blending is done by the opencv addWeighted function, and the output is written using imwrite. | ||
<!-- ---------------------------- --> | <!-- ---------------------------- --> |
Latest revision as of 16:23, 12 April 2016
Home < Documentation < Nightly < Extensions < BlendVectorVolumes
For the latest Slicer documentation, visit the read-the-docs. |
Introduction and Acknowledgements
Extension: OpenCVExample | |||||
|
Module Description
This is a CLI module that depends on the SlicerOpenCV extension, providing a way to blend two vector volumes together. It uses the OpenCV function addWeighted.
Use Cases
When loading in RGB files, they are loaded as vector volumes in Slicer. Use this module to blend them together if they have the same dimensions.
Tutorials
Panels and their use
IO:
|
Similar Modules
- The Slicer Pathology extension also uses the SlicerOpenCV extension.
References
- Quantitative Image Informatics for Cancer Research (QIICR)
- Open Source Computer Vision
- addWeighted documentation for version 3.1
Information for Developers
Section under construction. |
To depend on the OpenCV provided by the SlicerOpenCV extension, in the CLI's CMakeLists.txt file define OpenCV_DIR by finding the package that SlicerOpenCV provided:
find_package(OpenCV 3.1 REQUIRED)
- The header include path is defined as:
get_filename_component(OpenCV_INCLUDE_DIR ${OpenCV_DIR}/../../include ABSOLUTE)
- Add ${OpenCV_INCLUDE_DIR} to the MODULE_INCLUDE_DIRECTORIES list
- Link against the OpenCV libraries by adding ${OpenCV_LIBS} to the MODULE_TARGET_LIBRARIES
OpenCVExample provides some more information about writing an extension that includes modules that depend on OpenCV
The images are read in using the opencv imread method. The blending is done by the opencv addWeighted function, and the output is written using imwrite.