Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
IP
elsa
Commits
0347810b
Commit
0347810b
authored
Feb 04, 2020
by
David Frank
Committed by
Tobias Lasser
Feb 04, 2020
Browse files
change type of _indexMap in PartitionDescriptor to fix issue with older Eigen versions
parent
295a1d54
Pipeline
#210705
passed with stages
in 23 minutes and 28 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
elsa/core/PartitionDescriptor.cpp
View file @
0347810b
#include
"PartitionDescriptor.h"
#include
<map>
#include
<
unordered_
map>
namespace
elsa
{
...
...
@@ -58,7 +58,7 @@ namespace elsa
throw
std
::
invalid_argument
(
"PartitionDescriptor: cumulative size of partitioned "
"descriptor does not match size of original descriptor"
);
std
::
map
<
index_t
,
std
::
size
_t
>
sizeToIndex
;
std
::
unordered_
map
<
index_t
,
index
_t
>
sizeToIndex
;
_blockOffsets
[
0
]
=
0
;
for
(
index_t
i
=
0
;
i
<
getNumberOfBlocks
();
i
++
)
{
auto
it
=
sizeToIndex
.
find
(
slicesInBlock
[
i
]);
...
...
@@ -127,4 +127,4 @@ namespace elsa
coeffsPerDim
[
_numberOfDimensions
-
1
]
=
numberOfSlices
;
return
std
::
make_unique
<
DataDescriptor
>
(
coeffsPerDim
,
getSpacingPerDimension
());
}
}
// namespace elsa
\ No newline at end of file
}
// namespace elsa
elsa/core/PartitionDescriptor.h
View file @
0347810b
#include
"BlockDescriptor.h"
namespace
elsa
{
/**
...
...
@@ -67,7 +66,7 @@ namespace elsa
protected:
/// maps a block index to the index of the corresponding descriptor in _blockDescriptors
Eigen
::
VectorX
<
std
::
size
_t
>
_indexMap
;
IndexVector
_t
_indexMap
;
/// vector of unique DataDescriptors describing the individual blocks
std
::
vector
<
std
::
unique_ptr
<
DataDescriptor
>>
_blockDescriptors
;
...
...
@@ -88,4 +87,4 @@ namespace elsa
/// generates the descriptor of a partition containing numberOfSlices slices
std
::
unique_ptr
<
DataDescriptor
>
generateDescriptorOfPartition
(
index_t
numberOfSlices
)
const
;
};
}
// namespace elsa
\ No newline at end of file
}
// namespace elsa
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment