Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
CAMP
campvis-public
Commits
ceaff5fb
Commit
ceaff5fb
authored
Jul 05, 2016
by
Jakob Weiss
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Necessary changes to get the default modules to build again
parent
22ef73e9
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
42 additions
and
46 deletions
+42
-46
application/gui/datacontainerinspectorcanvas.cpp
application/gui/datacontainerinspectorcanvas.cpp
+7
-7
application/gui/datacontainerinspectorwidget.cpp
application/gui/datacontainerinspectorwidget.cpp
+8
-8
application/gui/properties/transferfunctionpropertywidget.cpp
...ication/gui/properties/transferfunctionpropertywidget.cpp
+1
-1
core/datastructures/imageseries.cpp
core/datastructures/imageseries.cpp
+4
-4
core/datastructures/renderdata.cpp
core/datastructures/renderdata.cpp
+8
-10
core/datastructures/renderdata.h
core/datastructures/renderdata.h
+2
-2
core/pipeline/pipelinepainter.cpp
core/pipeline/pipelinepainter.cpp
+3
-4
core/pipeline/slicerenderprocessor.cpp
core/pipeline/slicerenderprocessor.cpp
+1
-1
core/properties/transferfunctionproperty.cpp
core/properties/transferfunctionproperty.cpp
+2
-2
modules/advancedusvis/processors/predicatevolumeexplorer.cpp
modules/advancedusvis/processors/predicatevolumeexplorer.cpp
+1
-1
modules/devil/processors/devilimagewriter.cpp
modules/devil/processors/devilimagewriter.cpp
+3
-4
modules/tensor/processors/tensoranalyzer.cpp
modules/tensor/processors/tensoranalyzer.cpp
+2
-2
No files found.
application/gui/datacontainerinspectorcanvas.cpp
View file @
ceaff5fb
...
...
@@ -194,8 +194,8 @@ namespace campvis {
break
;
// gather image
cgtAssert
(
dynamic_cast
<
const
ImageData
*>
(
_textures
[
index
].
getData
(
)
),
"Found sth. else than ImageData in render texture vector. This should not happen!"
);
const
ImageData
*
id
=
static_cast
<
const
ImageData
*>
(
_textures
[
index
].
getData
(
)
);
cgtAssert
(
_textures
[
index
].
getData
<
ImageData
>
(),
"Found sth. else than ImageData in render texture vector. This should not happen!"
);
auto
id
=
_textures
[
index
].
getData
<
ImageData
>
();
// compute transformation matrices
float
renderTargetRatio
=
static_cast
<
float
>
(
_quadSize
.
x
)
/
static_cast
<
float
>
(
_quadSize
.
y
);
...
...
@@ -281,7 +281,7 @@ namespace campvis {
if
(
texIndx
<
0
||
texIndx
>=
static_cast
<
int
>
(
_textures
.
size
()))
return
;
const
ImageData
*
id
=
static_cast
<
const
ImageData
*>
(
_textures
[
texIndx
].
getData
(
)
);
auto
id
=
_textures
[
texIndx
].
getData
<
ImageData
>
();
const
cgt
::
Texture
*
tex
=
id
->
getRepresentation
<
ImageRepresentationGL
>
()
->
getTexture
();
const
ImageRepresentationLocal
*
localRep
=
id
->
getRepresentation
<
ImageRepresentationLocal
>
();
cgt
::
svec2
imageSize
=
id
->
getSize
().
xy
();
...
...
@@ -394,13 +394,13 @@ namespace campvis {
p_viewportSize
.
setValue
(
cgt
::
ivec2
(
width
(),
height
()));
for
(
std
::
map
<
QString
,
QtDataHandle
>::
iterator
it
=
_handles
.
begin
();
it
!=
_handles
.
end
();
++
it
)
{
if
(
const
ImageData
*
img
=
dynamic_cast
<
const
ImageData
*>
(
it
->
second
.
getData
(
)
))
{
if
(
auto
img
=
it
->
second
.
getData
<
ImageData
>
())
{
if
(
const
ImageRepresentationGL
*
imgGL
=
img
->
getRepresentation
<
ImageRepresentationGL
>
())
{
_textures
.
push_back
(
it
->
second
);
maxSlices
=
std
::
max
(
maxSlices
,
imgGL
->
getTexture
()
->
getDimensions
().
z
);
}
}
else
if
(
const
RenderData
*
rd
=
dynamic_cast
<
const
RenderData
*>
(
it
->
second
.
get
Data
(
)
))
{
else
if
(
auto
rd
=
it
->
second
.
getData
<
Render
Data
>
())
{
for
(
size_t
i
=
0
;
i
<
rd
->
getNumColorTextures
();
++
i
)
{
const
ImageRepresentationGL
*
imgGL
=
rd
->
getColorTexture
(
i
)
->
getRepresentation
<
ImageRepresentationGL
>
();
if
(
imgGL
)
{
...
...
@@ -415,7 +415,7 @@ namespace campvis {
}
}
else
if
(
const
GeometryData
*
gd
=
dynamic_cast
<
const
GeometryData
*>
(
it
->
second
.
get
Data
(
)
))
{
else
if
(
auto
gd
=
it
->
second
.
getData
<
Geometry
Data
>
())
{
std
::
string
name
=
it
->
first
.
toStdString
();
// copy geometry over to local
...
...
@@ -481,7 +481,7 @@ namespace campvis {
// check whether we have to render geometries
cgt
::
Bounds
unionBounds
;
for
(
std
::
map
<
QString
,
QtDataHandle
>::
iterator
it
=
_handles
.
begin
();
it
!=
_handles
.
end
();
++
it
)
{
if
(
const
GeometryData
*
gd
=
dynamic_cast
<
const
GeometryData
*>
(
it
->
second
.
get
Data
(
)
))
{
if
(
auto
gd
=
it
->
second
.
getData
<
Geometry
Data
>
())
{
unionBounds
.
addVolume
(
gd
->
getWorldBounds
());
}
}
...
...
application/gui/datacontainerinspectorwidget.cpp
View file @
ceaff5fb
...
...
@@ -260,7 +260,7 @@ namespace campvis {
QModelIndex
idxName
=
index
->
sibling
(
index
->
row
(),
0
);
// only consider non-empty DataHandles
if
(
handle
.
getData
()
!=
0
)
{
if
(
handle
)
{
handles
.
push_back
(
std
::
make_pair
(
idxName
.
data
(
Qt
::
DisplayRole
).
toString
(),
handle
));
_localFootprint
+=
handle
.
getData
()
->
getLocalMemoryFootprint
();
_videoFootprint
+=
handle
.
getData
()
->
getVideoMemoryFootprint
();
...
...
@@ -272,7 +272,7 @@ namespace campvis {
_lblName
->
setText
(
"Name: "
+
handles
.
front
().
first
);
_lblTimestamp
->
setText
(
"Timestamp: "
+
QString
::
number
(
handles
.
front
().
second
.
getTimestamp
()));
if
(
const
ImageData
*
tester
=
dynamic_cast
<
const
ImageData
*>
(
handles
.
front
().
second
.
getData
(
)
))
{
if
(
auto
tester
=
handles
.
front
().
second
.
getData
<
ImageData
>
())
{
_canvas
->
p_transferFunction
.
setImageHandle
(
handles
.
front
().
second
);
_lblNumChannels
->
setText
(
tr
(
"Number of Channels: "
)
+
QString
::
number
(
tester
->
getNumChannels
()));
...
...
@@ -294,7 +294,7 @@ namespace campvis {
_canvas
->
p_renderAChannel
.
setVisible
(
true
);
_canvas
->
p_geometryRendererProperties
.
setVisible
(
false
);
}
else
if
(
const
GeometryData
*
tester
=
dynamic_cast
<
const
GeometryData
*>
(
handles
.
front
().
second
.
getData
(
)
))
{
else
if
(
auto
tester
=
handles
.
front
().
second
.
getData
<
GeometryData
>
())
{
_lblSize
->
setText
(
tr
(
"Size: n/a"
));
_lblNumChannels
->
setText
(
tr
(
"Number of Channels: n/a"
));
...
...
@@ -310,7 +310,7 @@ namespace campvis {
_canvas
->
p_renderAChannel
.
setVisible
(
false
);
_canvas
->
p_geometryRendererProperties
.
setVisible
(
true
);
}
else
if
(
const
RenderData
*
tester
=
dynamic_cast
<
const
RenderData
*>
(
handles
.
front
().
second
.
getData
(
)
))
{
else
if
(
auto
tester
=
handles
.
front
().
second
.
getData
<
RenderData
>
())
{
const
ImageData
*
id
=
tester
->
getNumColorTextures
()
>
0
?
tester
->
getColorTexture
()
:
tester
->
getDepthTexture
();
if
(
id
!=
0
)
{
_lblNumChannels
->
setText
(
tr
(
"Number of Channels: "
)
+
QString
::
number
(
id
->
getNumChannels
()));
...
...
@@ -445,7 +445,7 @@ namespace campvis {
// only consider non-empty DataHandles that are ImageData and have render target representations
if
(
handle
.
getData
()
!=
0
)
{
if
(
dynamic_cast
<
const
ImageData
*>
(
handle
.
getData
())
&&
dynamic_cast
<
const
ImageData
*
>
(
handle
.
getData
(
)
)
->
getDimensionality
()
==
3
)
{
if
(
handle
.
getData
<
ImageData
>
(
)
&&
handle
.
getData
<
ImageData
>
()
->
getDimensionality
()
==
3
)
{
QString
dialogCaption
=
"Export "
+
name
+
" as MHD Image"
;
QString
directory
=
tr
(
""
);
const
QString
fileFilter
=
tr
(
"*.mhd;;MHD images (*.mhd)"
);
...
...
@@ -458,7 +458,7 @@ namespace campvis {
writer
.
invalidate
(
AbstractProcessor
::
INVALID_RESULT
);
writer
.
process
(
*
_dataContainer
);
}
else
if
(
dynamic_cast
<
const
ImageData
*
>
(
handle
.
getData
())
||
dynamic_cast
<
const
RenderData
*
>
(
handle
.
getData
()
))
{
else
if
(
handle
.
getData
<
ImageData
>
(
)
||
handle
.
getData
<
RenderData
>
())
{
QString
dialogCaption
=
"Export "
+
name
+
" as Image"
;
QString
directory
=
tr
(
""
);
const
QString
fileFilter
=
tr
(
"*.png;;PNG images (*.png)"
);
...
...
@@ -484,10 +484,10 @@ namespace campvis {
// get the ImageData object (either directly or from the RenderData)
const
ImageData
*
id
=
0
;
if
(
const
RenderData
*
tester
=
dynamic_cast
<
const
RenderData
*>
(
handle
.
get
Data
(
)
))
{
if
(
auto
tester
=
handle
.
getData
<
Render
Data
>
())
{
id
=
tester
->
getColorTexture
(
0
);
}
else
if
(
const
ImageData
*
tester
=
dynamic_cast
<
const
Ima
geData
*>
(
handle
.
ge
t
Data
(
)
))
{
else
if
(
auto
tester
=
handle
.
ge
t
Data
<
Ima
geData
>
())
{
id
=
tester
;
}
else
{
...
...
application/gui/properties/transferfunctionpropertywidget.cpp
View file @
ceaff5fb
...
...
@@ -153,7 +153,7 @@ namespace campvis {
DataHandle
dh
=
prop
->
getImageHandle
();
if
(
dh
.
getData
()
!=
0
)
{
const
ImageRepresentationLocal
*
idl
=
static_cast
<
const
ImageData
*
>
(
dh
.
getData
()
)
->
getRepresentation
<
ImageRepresentationLocal
>
();
const
ImageRepresentationLocal
*
idl
=
dh
.
getData
<
ImageData
>
()
->
getRepresentation
<
ImageRepresentationLocal
>
();
if
(
idl
!=
0
)
{
Interval
<
float
>
intensityInterval
=
idl
->
getNormalizedIntensityRange
();
tf
->
setIntensityDomain
(
cgt
::
vec2
(
intensityInterval
.
getLeft
(),
intensityInterval
.
getRight
()));
...
...
core/datastructures/imageseries.cpp
View file @
ceaff5fb
...
...
@@ -49,14 +49,14 @@ namespace campvis {
size_t
ImageSeries
::
getLocalMemoryFootprint
()
const
{
size_t
toReturn
=
sizeof
(
DataHandle
)
*
_images
.
capacity
();
for
(
size_t
i
=
0
;
i
<
_images
.
size
();
++
i
)
toReturn
+=
static_cast
<
const
ImageData
*>
(
_images
[
i
].
getData
()
)
->
getLocalMemoryFootprint
();
toReturn
+=
_images
[
i
].
getData
()
->
getLocalMemoryFootprint
();
return
toReturn
;
}
size_t
ImageSeries
::
getVideoMemoryFootprint
()
const
{
size_t
toReturn
=
0
;
for
(
size_t
i
=
0
;
i
<
_images
.
size
();
++
i
)
toReturn
+=
static_cast
<
const
ImageData
*>
(
_images
[
i
].
getData
()
)
->
getVideoMemoryFootprint
();
toReturn
+=
_images
[
i
].
getData
()
->
getVideoMemoryFootprint
();
return
toReturn
;
}
...
...
@@ -65,7 +65,7 @@ namespace campvis {
}
void
ImageSeries
::
addImage
(
DataHandle
dh
)
{
cgtAssert
(
d
ynamic_cast
<
const
ImageData
*
>
(
dh
.
getData
()
)
!=
0
,
"DataHandle must contain ImageData!"
);
cgtAssert
(
d
h
.
getData
<
ImageData
>
()
!=
0
,
"DataHandle must contain ImageData!"
);
_images
.
push_back
(
dh
);
}
...
...
@@ -85,7 +85,7 @@ namespace campvis {
cgt
::
Bounds
ImageSeries
::
getWorldBounds
()
const
{
cgt
::
Bounds
b
;
for
(
size_t
i
=
0
;
i
<
_images
.
size
();
++
i
)
{
b
.
addVolume
(
static_cast
<
const
ImageData
*>
(
_images
[
i
].
getData
(
)
)
->
getWorldBounds
());
b
.
addVolume
(
_images
[
i
].
getData
<
ImageData
>
()
->
getWorldBounds
());
}
return
b
;
}
...
...
core/datastructures/renderdata.cpp
View file @
ceaff5fb
...
...
@@ -101,12 +101,12 @@ namespace campvis {
return
_colorTextures
.
size
();
}
co
nst
ImageData
*
RenderData
::
getColorTexture
(
size_t
index
/*= 0*/
)
const
{
S
co
pedTypedData
<
ImageData
>
RenderData
::
getColorTexture
(
size_t
index
/*= 0*/
)
const
{
cgtAssert
(
index
<
_colorTextures
.
size
(),
"Index out of bounds."
);
if
(
index
>=
_colorTextures
.
size
())
return
0
;
return
ScopedTypedData
<
ImageData
>
(
DataHandle
(
nullptr
),
true
)
;
return
static_cast
<
const
ImageData
*>
(
_colorTextures
[
index
].
getData
(
)
);
return
_colorTextures
[
index
].
getData
<
ImageData
>
();
}
campvis
::
DataHandle
RenderData
::
getColorDataHandle
(
size_t
index
/*= 0*/
)
const
{
...
...
@@ -121,12 +121,10 @@ namespace campvis {
return
_depthTexture
.
getData
()
!=
0
;
}
const
ImageData
*
RenderData
::
getDepthTexture
()
const
{
const
AbstractData
*
d
=
_depthTexture
.
getData
();
if
(
d
==
0
)
return
0
;
ScopedTypedData
<
ImageData
>
RenderData
::
getDepthTexture
()
const
{
auto
d
=
_depthTexture
.
getData
<
ImageData
>
();
return
static_cast
<
const
ImageData
*>
(
d
)
;
return
d
;
}
campvis
::
DataHandle
RenderData
::
getDepthDataHandle
()
const
{
...
...
@@ -146,7 +144,7 @@ namespace campvis {
if
(
index
>=
_colorTextures
.
size
())
return
;
const
ImageData
*
id
=
static_cast
<
const
ImageData
*>
(
_colorTextures
[
index
].
getData
(
)
);
auto
id
=
_colorTextures
[
index
].
getData
<
ImageData
>
();
cgtAssert
(
id
!=
0
,
"WTF, color texture with 0 pointer?!"
);
const
ImageRepresentationGL
*
rep
=
id
->
getRepresentation
<
ImageRepresentationGL
>
(
true
);
...
...
@@ -158,7 +156,7 @@ namespace campvis {
if
(
_depthTexture
.
getData
()
==
0
)
return
;
const
ImageData
*
id
=
static_cast
<
const
ImageData
*>
(
_depthTexture
.
getData
(
)
);
const
ImageData
*
id
=
_depthTexture
.
getData
<
ImageData
>
();
const
ImageRepresentationGL
*
rep
=
id
->
getRepresentation
<
ImageRepresentationGL
>
(
true
);
rep
->
bind
(
shader
,
depthTexUnit
,
depthTexUniform
,
texParamsUniform
);
}
...
...
core/datastructures/renderdata.h
View file @
ceaff5fb
...
...
@@ -89,7 +89,7 @@ namespace campvis {
* \param index Index of the color texture to return.
* \return _colorTextures[index], 0 if index out of bounds.
*/
co
nst
ImageData
*
getColorTexture
(
size_t
index
=
0
)
const
;
S
co
pedTypedData
<
ImageData
>
getColorTexture
(
size_t
index
=
0
)
const
;
/**
* Gets the DataHandle with the color texture in this RenderData.
...
...
@@ -109,7 +109,7 @@ namespace campvis {
* Returns 0 if no depth texture is present.
* \return _depthTexture, may be 0.
*/
co
nst
ImageData
*
getDepthTexture
()
const
;
S
co
pedTypedData
<
ImageData
>
getDepthTexture
()
const
;
/**
* Gets the DataHandle with the depth texture in this RenderData, if present.
...
...
core/pipeline/pipelinepainter.cpp
View file @
ceaff5fb
...
...
@@ -64,11 +64,10 @@ namespace campvis {
// try get Data
DataHandle
dh
=
_pipeline
->
getDataContainer
().
getData
(
_pipeline
->
getRenderTargetID
());
co
nst
RenderData
*
rd
=
nullptr
;
S
co
pedTypedData
<
RenderData
>
rd
(
dh
)
;
const
ImageRepresentationGL
*
repGL
=
nullptr
;
if
(
dh
.
getData
()
!=
nullptr
)
{
rd
=
dynamic_cast
<
const
RenderData
*>
(
dh
.
getData
());
if
(
const
ImageData
*
id
=
dynamic_cast
<
const
ImageData
*>
(
dh
.
getData
()))
if
(
rd
!=
nullptr
)
{
if
(
auto
id
=
dh
.
getData
<
ImageData
>
())
repGL
=
id
->
getRepresentation
<
ImageRepresentationGL
>
();
}
...
...
core/pipeline/slicerenderprocessor.cpp
View file @
ceaff5fb
...
...
@@ -162,7 +162,7 @@ namespace campvis {
// we need an image as reference
if
(
_currentImage
.
getData
()
!=
nullptr
)
{
if
(
const
ImageData
*
id
=
static_cast
<
const
ImageData
*>
(
_current
Image
.
get
Data
(
)
))
{
if
(
auto
id
=
_currentImage
.
getData
<
ImageData
>
())
{
// we only handle mouse events
if
(
cgt
::
MouseEvent
*
me
=
dynamic_cast
<
cgt
::
MouseEvent
*>
(
e
))
{
...
...
core/properties/transferfunctionproperty.cpp
View file @
ceaff5fb
...
...
@@ -98,11 +98,11 @@ namespace campvis {
void
TransferFunctionProperty
::
setImageHandle
(
DataHandle
imageHandle
)
{
cgtAssert
(
imageHandle
.
getData
()
==
0
||
dynamic_cast
<
const
ImageData
*>
(
imageHandle
.
getData
())
!=
0
,
!
imageHandle
||
imageHandle
.
getData
<
ImageData
>
()
,
"The data in the image handle must either be 0 or point to a valid ImageData object!"
);
if
(
_autoFitWindowToData
&&
imageHandle
.
getData
()
!=
0
)
{
if
(
const
ImageData
*
id
=
dynamic_cast
<
const
ImageData
*>
(
imageHandle
.
getData
(
)
))
{
if
(
auto
id
=
imageHandle
.
getData
<
ImageData
>
())
{
const
ImageRepresentationLocal
*
localRep
=
id
->
getRepresentation
<
ImageRepresentationLocal
>
();
if
(
localRep
!=
0
)
{
const
Interval
<
float
>&
ii
=
localRep
->
getNormalizedIntensityRange
();
...
...
modules/advancedusvis/processors/predicatevolumeexplorer.cpp
View file @
ceaff5fb
...
...
@@ -175,7 +175,7 @@ namespace campvis {
std
::
vector
<
int
>
toReturn
=
std
::
vector
<
int
>
(
p_histogram
.
getPredicateHistogram
()
->
getPredicates
().
size
(),
0
);
if
(
_bitmaskHandle
.
getData
()
!=
nullptr
)
{
const
ImageData
*
id
=
static_cast
<
const
ImageData
*>
(
_bitmaskHandle
.
getData
(
)
);
auto
id
=
_bitmaskHandle
.
getData
<
ImageData
>
();
if
(
const
GenericImageRepresentationLocal
<
BitmaskType
,
1
>*
repLocal
=
id
->
getRepresentation
<
GenericImageRepresentationLocal
<
BitmaskType
,
1
>
>
())
{
// traverse all voxels and for each bitmask check each bit whether its set
for
(
size_t
i
=
0
;
i
<
voxels
.
size
();
++
i
)
{
...
...
modules/devil/processors/devilimagewriter.cpp
View file @
ceaff5fb
...
...
@@ -59,12 +59,11 @@ namespace campvis {
void
DevilImageWriter
::
updateResult
(
DataContainer
&
data
)
{
// try get Data
DataHandle
dh
=
data
.
getData
(
p_inputImage
.
getValue
());
co
nst
RenderData
*
rd
=
nullptr
;
S
co
pedTypedData
<
RenderData
>
rd
(
dh
)
;
const
ImageRepresentationLocal
*
repLocal
=
nullptr
;
if
(
dh
.
getData
()
!=
nullptr
)
{
rd
=
dynamic_cast
<
const
RenderData
*>
(
dh
.
getData
());
if
(
const
ImageData
*
id
=
dynamic_cast
<
const
ImageData
*>
(
dh
.
getData
()))
if
(
dh
)
{
if
(
auto
id
=
dh
.
getData
<
ImageData
>
())
repLocal
=
id
->
getRepresentation
<
ImageRepresentationLocal
>
();
std
::
string
filename
=
p_url
.
getValue
();
...
...
modules/tensor/processors/tensoranalyzer.cpp
View file @
ceaff5fb
...
...
@@ -235,8 +235,8 @@ namespace campvis {
const
GenericImageRepresentationLocal
<
float
,
3
>*
evalRep
=
0
;
const
GenericImageRepresentationLocal
<
float
,
9
>*
evecRep
=
0
;
if
(
_eigenvalues
.
getData
()
!=
0
&&
_eigenvectors
.
getData
()
!=
0
)
{
evalRep
=
static_cast
<
const
ImageData
*>
(
_eigenvalues
.
getData
(
)
)
->
getRepresentation
<
GenericImageRepresentationLocal
<
float
,
3
>
>
(
false
);
evecRep
=
static_cast
<
const
ImageData
*>
(
_eigenvectors
.
getData
(
)
)
->
getRepresentation
<
GenericImageRepresentationLocal
<
float
,
9
>
>
(
false
);
evalRep
=
_eigenvalues
.
getData
<
ImageData
>
()
->
getRepresentation
<
GenericImageRepresentationLocal
<
float
,
3
>
>
(
false
);
evecRep
=
_eigenvectors
.
getData
<
ImageData
>
()
->
getRepresentation
<
GenericImageRepresentationLocal
<
float
,
9
>
>
(
false
);
}
if
(
evalRep
==
0
||
evecRep
==
0
)
{
LERROR
(
"Could not compute output, no eigensystem present."
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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