Some basic utility functions to be used along with OpenCV. More...
#include <algorithm>
#include <functional>
#include "itkImage.h"
#include "itkImageRegionIterator.h"
#include "gdcmMD5.h"
#include "opencv2/core/core.hpp"
Go to the source code of this file.
Functions | |
cv::Mat | Add (const cv::InputArray &input1, const cv::InputArray &input2) |
Wrap of OpenCV's add function. | |
cv::Mat | Invert (const cv::InputArray &input) |
Wrap of OpenCV's invert function. | |
template<typename TDataType > | |
std::vector< TDataType > | L2normalize (const std::vector< TDataType > &inputVector) |
Normalize a vector based on its L2 norm. More... | |
cv::Mat | Multiply (const cv::Mat &input1, const cv::Mat &input2) |
Wrap of OpenCV's multiply function. | |
cv::Mat | Multiply (const cv::Mat &input1, const double input2) |
Wrap of OpenCV's multiply function. | |
cv::Mat | Subtract (const cv::InputArray &input1, const cv::InputArray &input2) |
Wrap of OpenCV's subtract function. | |
cv::Mat | Transpose (const cv::InputArray &input) |
Wrap of OpenCV's transpose function. | |
template<class TImageType > | |
cv::Mat | VectorizeImages (const std::vector< std::vector< typename TImageType::Pointer > > inputSubjectsAndImages, const std::vector< typename TImageType::Pointer > maskImages, const bool columnMajor, const bool appendInputImagesFromSubjects, const bool maskDefinedPerSubject) |
Vectorizes a set of images. More... | |
template<class TImageType > | |
cv::Mat | VectorizeImages (const std::vector< std::vector< typename TImageType::Pointer > > inputSubjectsAndImages, const std::vector< std::vector< typename TImageType::IndexType > > maskIndeces, const bool appendInputImagesFromSubjects=false, const bool columnMajor=false, const bool maskDefinedPerSubject=false) |
Vectorizes a set of images. More... | |
template<class TImageType > | |
cv::Mat | VectorizeImages (const std::vector< std::vector< typename TImageType::Pointer > > inputSubjectsAndImages, const bool columnMajor=false, const bool appendInputImagesFromSubjects=false) |
Vectorizes a set of images. More... | |
Some basic utility functions to be used along with OpenCV.
Dependecies: ITK, OpenCV, OpenMP
https://www.cbica.upenn.edu/sbia/software/
softw are@ cbica .upe nn.ed u
Copyright (c) 2015 University of Pennsylvania. All rights reserved.
See COPYING file or https://www.cbica.upenn.edu/sbia/software/license.html
std::vector< TDataType > cbica::L2normalize | ( | const std::vector< TDataType > & | inputVector | ) |
Normalize a vector based on its L2 norm.
inputVector | The vector to normalize |
References cbica::L2normalize().
Referenced by cbica::L2normalize().
cv::Mat cbica::VectorizeImages | ( | const std::vector< std::vector< typename TImageType::Pointer > > | inputSubjectsAndImages, |
const std::vector< typename TImageType::Pointer > | maskImages, | ||
const bool | columnMajor, | ||
const bool | appendInputImagesFromSubjects, | ||
const bool | maskDefinedPerSubject | ||
) |
Vectorizes a set of images.
inputSubjectsAndImages | The subjects and images which are to be vectorized |
maskImages | The masks to be used for the input images |
columnMajor | If true, image intensities are converted to column vectors; otherwise they are converted to row vectors; and then they are concatinated |
appendInputImagesFromSubjects | If true, concatenate all image voxels together in a single column/row |
maskDefinedPerSubject | If true, the mask is defined on a per-subject basis instead of per-modality |
References cbica::VectorizeImages().
Referenced by cbica::VectorizeImages().
cv::Mat cbica::VectorizeImages | ( | const std::vector< std::vector< typename TImageType::Pointer > > | inputSubjectsAndImages, |
const std::vector< std::vector< typename TImageType::IndexType > > | maskIndeces, | ||
const bool | appendInputImagesFromSubjects = false , |
||
const bool | columnMajor = false , |
||
const bool | maskDefinedPerSubject = false |
||
) |
Vectorizes a set of images.
inputSubjectsAndImages | The subjects and images which are to be vectorized |
maskIndeces | The mask indeces to be used for the input images |
columnMajor | If true, image intensities are converted to column vectors; otherwise they are converted to row vectors; and then they are concatinated |
appendInputImagesFromSubjects | If true, concatenate all image voxels together in a single column/row |
maskDefinedPerSubject | If true, the mask is defined on a per-subject basis instead of per-modality |
References cbica::VectorizeImages().
cv::Mat cbica::VectorizeImages | ( | const std::vector< std::vector< typename TImageType::Pointer > > | inputSubjectsAndImages, |
const bool | columnMajor = false , |
||
const bool | appendInputImagesFromSubjects = false |
||
) |
Vectorizes a set of images.
inputSubjectsAndImages | The images which are to be vectorized |
columnMajor | If true, image intensities are converted to column vectors; otherwise they are converted to row vectors; and then they are concatinated |
appendInputImagesFromSubjects | If true, concatenate all image voxels together in a single column/row |
References cbica::VectorizeImages().