Commit 0abfb4ca authored by andibraimllari's avatar andibraimllari
Browse files

chain constructor calls, lower signal size to increase test speed, add a...

chain constructor calls, lower signal size to increase test speed, add a comment to the documentation
parent 5b71f7e7
Pipeline #751703 passed with stages
in 12 minutes and 23 seconds
......@@ -17,36 +17,15 @@ namespace elsa
template <typename ret_t, typename data_t>
ShearletTransform<ret_t, data_t>::ShearletTransform(index_t width, index_t height)
: LinearOperator<ret_t>(
VolumeDescriptor{{width, height}},
VolumeDescriptor{{width, height, calculateNumOfLayers(width, height)}}),
_width{width},
_height{height},
_numOfScales{calculateNumOfScales(width, height)},
_numOfLayers{calculateNumOfLayers(width, height)}
: ShearletTransform(width, height, calculateNumOfScales(width, height))
{
if (width < 0 || height < 0) {
throw LogicError("ShearletTransform: Only positive width and height is supported");
}
}
template <typename ret_t, typename data_t>
ShearletTransform<ret_t, data_t>::ShearletTransform(index_t width, index_t height,
index_t numOfScales)
: LinearOperator<ret_t>(
VolumeDescriptor{{width, height}},
VolumeDescriptor{{width, height, calculateNumOfLayers(numOfScales)}}),
_width{width},
_height{height},
_numOfScales{numOfScales},
_numOfLayers{calculateNumOfLayers(numOfScales)}
: ShearletTransform(width, height, numOfScales, std::nullopt)
{
if (width < 0 || height < 0) {
throw LogicError("ShearletTransform: Only positive width and height is supported");
}
if (numOfScales < 0) {
throw LogicError("ShearletTransform: Only positive number of scales are supported");
}
}
template <typename ret_t, typename data_t>
......
......@@ -17,6 +17,8 @@ namespace elsa
* handles signals with one channel, e.g. grayscale images. Increasing the number of scales
* will increase precision.
*
* Note that this class only handles the 2D scenario.
*
* References:
* https://www.math.uh.edu/~dlabate/SHBookIntro.pdf
* https://www.math.uh.edu/~dlabate/Athens.pdf
......
......@@ -23,7 +23,7 @@ TEST_CASE_TEMPLATE("ShearletTransform: Testing construction", TestType, float, d
GIVEN("a DataDescriptor")
{
IndexVector_t size(2);
size << 256, 256;
size << 64, 64;
VolumeDescriptor volDescr(size);
WHEN("instantiating a ShearletTransform operator")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment