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
30e6fec6
Commit
30e6fec6
authored
Aug 14, 2013
by
Christian Schulte zu Berge
Browse files
further work on Columbia module
parent
f85d0ae6
Changes
5
Hide whitespace changes
Inline
Side-by-side
application/campvis.cpp
View file @
30e6fec6
...
...
@@ -61,7 +61,7 @@ int main(int argc, char** argv) {
//app.addVisualizationPipeline("Confidence Map Generation", new CmBatchGeneration());
// app.addVisualizationPipeline("IXPV", new IxpvDemo());
//app.addVisualizationPipeline("SliceVis", new SliceVis());
//
app.addVisualizationPipeline("DVRVis", new DVRVis());
app
.
addVisualizationPipeline
(
"DVRVis"
,
new
DVRVis
());
//app.addVisualizationPipeline("VolumeRendererDemo", new VolumeRendererDemo());
#ifdef HAS_KISSCL
//app.addVisualizationPipeline("DVR with OpenCL", new OpenCLPipeline());
...
...
modules/columbia/pipelines/columbia1.cpp
View file @
30e6fec6
...
...
@@ -44,6 +44,7 @@ namespace campvis {
,
_camera
(
"camera"
,
"Camera"
)
,
_boundsData
(
"BoundsData"
,
"Bounds Data"
,
"sfr"
,
DataNameProperty
::
READ
)
,
_imageReader
()
,
_flowReader
()
,
_vtkReader
()
,
_vr
(
_effectiveRenderTargetSize
)
,
_sr
(
_effectiveRenderTargetSize
)
...
...
@@ -51,6 +52,7 @@ namespace campvis {
,
_gr
(
_effectiveRenderTargetSize
)
,
_sft
()
,
_sfr
(
_effectiveRenderTargetSize
)
,
_compositor
(
_effectiveRenderTargetSize
)
,
_trackballEH
(
0
)
{
addProperty
(
&
_camera
);
...
...
@@ -60,14 +62,22 @@ namespace campvis {
_eventHandlers
.
push_back
(
_trackballEH
);
addProcessor
(
&
_imageReader
);
addProcessor
(
&
_vtkReader
);
addProcessor
(
&
_splitter
);
//addProcessor(&_vr);
addProcessor
(
&
_imageSplitter
);
addProcessor
(
&
_vr
);
addProcessor
(
&
_flowReader
);
addProcessor
(
&
_flowSplitter
);
//addProcessor(&_vtkReader);
//addProcessor(&_src);
addProcessor
(
&
_sr
);
addProcessor
(
&
_gr
);
//addProcessor(&_gr);
addProcessor
(
&
_sft
);
addProcessor
(
&
_sfr
);
addProcessor
(
&
_compositor
);
}
Columbia1
::~
Columbia1
()
{
...
...
@@ -77,7 +87,7 @@ namespace campvis {
void
Columbia1
::
init
()
{
VisualizationPipeline
::
init
();
_
s
plitter
.
s_validated
.
connect
(
this
,
&
Columbia1
::
onProcessorValidated
);
_
imageS
plitter
.
s_validated
.
connect
(
this
,
&
Columbia1
::
onProcessorValidated
);
_camera
.
addSharedProperty
(
&
_vr
.
p_camera
);
_camera
.
addSharedProperty
(
&
_src
.
p_camera
);
...
...
@@ -87,28 +97,41 @@ namespace campvis {
_vr
.
p_outputImage
.
setValue
(
"vr"
);
_sr
.
p_targetImageID
.
setValue
(
"sr"
);
_src
.
p_targetImageID
.
setValue
(
"src"
);
_
renderTargetID
.
setValue
(
"
sfr
"
);
_
compositor
.
p_targetImageId
.
setValue
(
"
composited
"
);
_imageReader
.
p_url
.
setValue
(
"D:/Medical Data/Columbia/outputs/FullVolumeLV_3D_25Hz_[IM_0004]_NIF_crop_flow_field_00_00.ltf"
);
_imageReader
.
p_size
.
setValue
(
tgt
::
ivec3
(
224
,
176
,
208
));
_imageReader
.
p_numChannels
.
setValue
(
3
);
_imageReader
.
p_baseType
.
selectById
(
"float"
);
_imageReader
.
p_targetImageID
.
setValue
(
"reader.output"
);
_imageReader
.
p_targetImageID
.
connect
(
&
_splitter
.
p_inputID
);
_renderTargetID
.
setValue
(
"composited"
);
_imageReader
.
p_url
.
setValue
(
"D:/Medical Data/Columbia/inputs/FullVolumeLV_3D_25Hz_[IM_0004]_NIF_diffused_crop_00.ltf"
);
_imageReader
.
p_size
.
setValue
(
tgt
::
ivec3
(
224
,
176
,
208
));
_imageReader
.
p_numChannels
.
setValue
(
1
);
_imageReader
.
p_baseType
.
selectById
(
"uint8"
);
_imageReader
.
p_targetImageID
.
setValue
(
"image"
);
_imageReader
.
p_targetImageID
.
connect
(
&
_imageSplitter
.
p_inputID
);
_imageSplitter
.
p_outputID
.
setValue
(
"image.single"
);
_imageSplitter
.
p_outputID
.
connect
(
&
_vr
.
p_inputVolume
);
_flowReader
.
p_url
.
setValue
(
"D:/Medical Data/Columbia/outputs/FullVolumeLV_3D_25Hz_[IM_0004]_NIF_crop_flow_field_00_00.ltf"
);
_flowReader
.
p_size
.
setValue
(
tgt
::
ivec3
(
224
,
176
,
208
));
_flowReader
.
p_numChannels
.
setValue
(
3
);
_flowReader
.
p_baseType
.
selectById
(
"float"
);
_flowReader
.
p_targetImageID
.
setValue
(
"flow"
);
_flowReader
.
p_targetImageID
.
connect
(
&
_flowSplitter
.
p_inputID
);
_flowSplitter
.
p_outputID
.
setValue
(
"flow.single"
);
_flowSplitter
.
p_outputID
.
connect
(
&
_src
.
p_sourceImageID
);
_flowSplitter
.
p_outputID
.
connect
(
&
_sr
.
p_sourceImageID
);
_flowSplitter
.
p_outputID
.
connect
(
&
_sft
.
p_strainId
);
_vtkReader
.
p_targetImageID
.
setValue
(
"mesh"
);
_vtkReader
.
p_url
.
setValue
(
"D:/Medical Data/Columbia/inputs/Myocardium Meshes/FullVolumeLV_3D_25Hz_ED_Mesh_Endo.vtk"
);
_vtkReader
.
p_targetImageID
.
connect
(
&
_gr
.
p_geometryID
);
_splitter
.
p_outputID
.
connect
(
&
_vr
.
p_inputVolume
);
_splitter
.
p_outputID
.
connect
(
&
_src
.
p_sourceImageID
);
_splitter
.
p_outputID
.
connect
(
&
_sr
.
p_sourceImageID
);
_splitter
.
p_outputID
.
connect
(
&
_sft
.
p_strainId
);
Geometry1DTransferFunction
*
dvrTF
=
new
Geometry1DTransferFunction
(
128
,
tgt
::
vec2
(
0.
f
,
1.
f
));
dvrTF
->
addGeometry
(
TFGeometry1D
::
createQuad
(
tgt
::
vec2
(
.1
f
,
.125
f
),
tgt
::
col4
(
255
,
0
,
0
,
32
),
tgt
::
col4
(
255
,
0
,
0
,
32
)));
dvrTF
->
addGeometry
(
TFGeometry1D
::
createQuad
(
tgt
::
vec2
(
.4
f
,
.5
f
),
tgt
::
col4
(
0
,
255
,
0
,
128
),
tgt
::
col4
(
0
,
255
,
0
,
128
)));
static_cast
<
TransferFunctionProperty
*>
(
_vr
.
getProperty
(
"transferFunction"
))
->
replaceTF
(
dvrTF
);
_vr
.
p_outputImage
.
connect
(
&
_compositor
.
p_secondImageId
);
_gr
.
p_renderTargetID
.
setValue
(
"gr"
);
...
...
@@ -116,6 +139,8 @@ namespace campvis {
_sft
.
p_outputID
.
connect
(
&
_sfr
.
p_strainId
);
_sfr
.
p_renderTargetID
.
setValue
(
"sfr"
);
_sfr
.
p_renderTargetID
.
connect
(
static_cast
<
DataNameProperty
*>
(
_vr
.
getProperty
(
"GeometryImageId"
)));
_sfr
.
p_renderTargetID
.
connect
(
&
_compositor
.
p_firstImageId
);
_trackballEH
->
setViewportSize
(
_effectiveRenderTargetSize
.
getValue
());
_effectiveRenderTargetSize
.
s_changed
.
connect
<
Columbia1
>
(
this
,
&
Columbia1
::
onRenderTargetSizeChanged
);
...
...
@@ -137,9 +162,9 @@ namespace campvis {
}
void
Columbia1
::
onProcessorValidated
(
AbstractProcessor
*
processor
)
{
if
(
processor
==
&
_
s
plitter
)
{
if
(
processor
==
&
_
imageS
plitter
)
{
// update camera
DataContainer
::
ScopedTypedData
<
ImageData
>
img
(
_data
,
_
s
plitter
.
p_outputID
.
getValue
());
DataContainer
::
ScopedTypedData
<
ImageData
>
img
(
_data
,
_
imageS
plitter
.
p_outputID
.
getValue
());
if
(
img
!=
0
)
{
tgt
::
Bounds
volumeExtent
=
img
->
getWorldBounds
();
if
(
_trackballEH
->
getSceneBounds
()
!=
volumeExtent
)
{
...
...
@@ -152,7 +177,5 @@ namespace campvis {
}
}
}
}
\ No newline at end of file
modules/columbia/pipelines/columbia1.h
View file @
30e6fec6
...
...
@@ -43,6 +43,7 @@
#include
"modules/columbia/processors/strainfiberrenderer.h"
#include
"modules/columbia/processors/strainraycaster.h"
#include
"modules/vis/processors/geometryrenderer.h"
#include
"modules/vis/processors/rendertargetcompositor.h"
#include
"modules/vis/processors/sliceextractor.h"
#include
"modules/vis/processors/volumerenderer.h"
...
...
@@ -83,8 +84,12 @@ namespace campvis {
DataNameProperty
_boundsData
;
LtfImageReader
_imageReader
;
ImageSeriesSplitter
_imageSplitter
;
LtfImageReader
_flowReader
;
ImageSeriesSplitter
_flowSplitter
;
VtkImageReader
_vtkReader
;
ImageSeriesSplitter
_splitter
;
VolumeRenderer
_vr
;
StrainRaycaster
_src
;
SliceExtractor
_sr
;
...
...
@@ -93,6 +98,8 @@ namespace campvis {
StrainFiberTracker
_sft
;
StrainFiberRenderer
_sfr
;
RenderTargetCompositor
_compositor
;
TrackballNavigationEventHandler
*
_trackballEH
;
};
...
...
modules/vis/processors/eepgenerator.cpp
View file @
30e6fec6
...
...
@@ -46,7 +46,7 @@ namespace campvis {
EEPGenerator
::
EEPGenerator
(
IVec2Property
&
canvasSize
)
:
VisualizationProcessor
(
canvasSize
)
,
p_sourceImageID
(
"sourceImageID"
,
"Input Image"
,
""
,
DataNameProperty
::
READ
)
,
p_geometryID
(
"geometryID"
,
"Input Geometry ID"
,
"proxygeometry"
,
DataNameProperty
::
READ
)
,
p_geometryID
(
"geometryID"
,
"Input
Proxy
Geometry ID"
,
"proxygeometry"
,
DataNameProperty
::
READ
)
,
p_mirrorID
(
"mirrorID"
,
"Input Mirror ID"
,
"mirror"
,
DataNameProperty
::
READ
)
,
p_geometryImageId
(
"GeometryImageId"
,
"Rendered Geometry to Integrate (optional)"
,
""
,
DataNameProperty
::
READ
)
,
p_entryImageID
(
"entryImageID"
,
"Output Entry Points Image"
,
"eep.entry"
,
DataNameProperty
::
WRITE
)
...
...
modules/vis/processors/volumerenderer.cpp
View file @
30e6fec6
...
...
@@ -56,7 +56,9 @@ namespace campvis {
addProperty
(
&
_raycaster
.
p_transferFunction
);
addProperty
(
&
_raycaster
.
p_samplingRate
);
addProperty
(
&
p_outputImage
);
addProperty
(
_raycaster
.
getProperty
(
"CentralDifferences"
));
addProperty
(
_eepGenerator
.
getProperty
(
"GeometryImageId"
));
// setup shared properties
p_inputVolume
.
addSharedProperty
(
&
_pgGenerator
.
p_sourceImageID
);
...
...
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