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
CAMP
campvis-public
Commits
882f4d50
Commit
882f4d50
authored
Jan 06, 2014
by
Christian Schulte zu Berge
Browse files
finished merging branch tensor_data_support into development
parent
cbc52f60
Changes
7
Hide whitespace changes
Inline
Side-by-side
core/datastructures/tensor.h
View file @
882f4d50
...
...
@@ -98,10 +98,6 @@ namespace campvis {
elem
[
i
]
=
T
(
v
.
elem
[
i
]);
}
/// Destructor
~
Tensor2
()
{
}
/// Index operator
const
T
&
operator
[]
(
size_t
index
)
const
{
return
elem
[
index
];
...
...
modules/tensor/pipelines/tensordemo.cpp
View file @
882f4d50
...
...
@@ -53,10 +53,9 @@ namespace campvis {
_imageReader
.
p_url
.
setValue
(
CAMPVIS_SOURCE_DIR
"/modules/tensor/sampledata/planar_tensor.mhd"
);
_imageReader
.
p_targetImageID
.
setValue
(
"reader.output"
);
_imageReader
.
p_targetImageID
.
addSharedProperty
(
&
_ta
.
p_inputImage
);
_ta
.
p_outputProperties
[
0
]
->
_imageId
.
addSharedProperty
(
&
_sliceExtractor
.
p_sourceImageID
);
_ta
.
p_outputProperties
[
0
]
->
_imageType
.
selectById
(
"MainEigenvector"
);
_ta
.
s_validated
.
connect
(
this
,
&
TensorDemo
::
onProcessorValidated
);
_sliceExtractor
.
p_xSliceNumber
.
setValue
(
0
);
...
...
@@ -68,13 +67,4 @@ namespace campvis {
_renderTargetID
.
addSharedProperty
(
&
(
_sliceExtractor
.
p_targetImageID
));
}
void
TensorDemo
::
onProcessorValidated
(
AbstractProcessor
*
processor
)
{
if
(
processor
==
&
_imageReader
)
{
ScopedTypedData
<
ImageData
>
img
(
*
_data
,
_sliceExtractor
.
p_sourceImageID
.
getValue
());
if
(
img
!=
0
)
{
_sliceExtractor
.
p_transferFunction
.
getTF
()
->
setImageHandle
(
img
.
getDataHandle
());
}
}
}
}
modules/tensor/pipelines/tensordemo.h
View file @
882f4d50
...
...
@@ -54,13 +54,6 @@ namespace campvis {
static
const
std
::
string
getId
()
{
return
"TensorDemo"
;
};
protected:
/**
* Slot getting called when one of the observed processors got validated.
* Updates the camera properties, when the input image has changed.
* \param processor The processor that emitted the signal
*/
virtual
void
onProcessorValidated
(
AbstractProcessor
*
processor
);
MhdImageReader
_imageReader
;
TensorAnalyzer
_ta
;
SliceExtractor
_sliceExtractor
;
...
...
modules/tensor/processors/tensoranalyzer.cpp
View file @
882f4d50
...
...
@@ -475,4 +475,10 @@ namespace campvis {
addProperty
(
&
opp
->
_imageType
);
}
void
TensorAnalyzer
::
deinit
()
{
_eigenvectors
=
DataHandle
(
0
);
_eigenvalues
=
DataHandle
(
0
);
AbstractProcessor
::
deinit
();
}
}
modules/tensor/processors/tensoranalyzer.h
View file @
882f4d50
...
...
@@ -80,6 +80,7 @@ namespace campvis {
virtual
ProcessorState
getProcessorState
()
const
{
return
AbstractProcessor
::
EXPERIMENTAL
;
};
virtual
void
process
(
DataContainer
&
data
);
virtual
void
deinit
();
DataNameProperty
p_inputImage
;
///< ID for input volume
DataNameProperty
p_evalsImage
;
///< ID for output gradient volume
...
...
modules/tensor/sampledata/updown_img.mhd
View file @
882f4d50
...
...
@@ -3,4 +3,4 @@ DimSize = 60 60 31
ElementType = MET_FLOAT
ElementSpacing = 1.000000 1.000000 1.000000
ElementByteOrderMSB = False
ElementDataFile =
img_dataset
.raw
ElementDataFile =
updown_img
.raw
modules/tensor/sampledata/updown_tensor.mhd
View file @
882f4d50
...
...
@@ -4,4 +4,4 @@ DimSize = 60 60 31
ElementType = MET_FLOAT
ElementSpacing = 1.000000 1.000000 1.000000
ElementByteOrderMSB = False
ElementDataFile =
tensor_dataset
.raw
ElementDataFile =
updown_tensor
.raw
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