Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bill Lorensen
VTK
Commits
46761f2a
Commit
46761f2a
authored
Feb 16, 2012
by
George Zagaris
Browse files
ENH:Use vtkOverlappingAMR in AMR volume mapper
Change-Id: I521d888053468c8a45707938870e00463d0d433b
parent
e9641beb
Changes
2
Hide whitespace changes
Inline
Side-by-side
VolumeRendering/vtkAMRVolumeMapper.cxx
View file @
46761f2a
...
...
@@ -24,7 +24,7 @@
#include "vtkInformation.h"
#include "vtkInformationVector.h"
#include "vtkMath.h"
#include "vtk
HierarchicalBoxDataSet
.h"
#include "vtk
OverlappingAMR
.h"
#include "vtkMatrix4x4.h"
#include "vtkMultiBlockDataSet.h"
#include "vtkMultiThreader.h"
...
...
@@ -85,7 +85,7 @@ void vtkAMRVolumeMapper::SetInput(vtkDataSet *genericInput)
this
->
Resampler
->
SetInputConnection
(
0
,
0
);
}
//----------------------------------------------------------------------------
void
vtkAMRVolumeMapper
::
SetInput
(
vtk
HierarchicalBoxDataSet
*
hdata
)
void
vtkAMRVolumeMapper
::
SetInput
(
vtk
OverlappingAMR
*
hdata
)
{
if
(
!
hdata
)
{
...
...
@@ -114,9 +114,9 @@ void vtkAMRVolumeMapper::SetInputConnection (int port, vtkAlgorithmOutput *input
//----------------------------------------------------------------------------
double
*
vtkAMRVolumeMapper
::
GetBounds
()
{
vtk
HierarchicalBoxDataSet
*
hdata
;
vtk
OverlappingAMR
*
hdata
;
hdata
=
vtk
HierarchicalBoxDataSet
::
SafeDownCast
vtk
OverlappingAMR
::
SafeDownCast
(
this
->
Resampler
->
GetInputDataObject
(
0
,
0
));
if
(
!
hdata
)
{
...
...
@@ -132,7 +132,7 @@ double *vtkAMRVolumeMapper::GetBounds()
int
vtkAMRVolumeMapper
::
FillInputPortInformation
(
int
vtkNotUsed
(
port
),
vtkInformation
*
info
)
{
info
->
Set
(
vtkAlgorithm
::
INPUT_REQUIRED_DATA_TYPE
(),
"vtk
HierarchicalBoxDataSet
"
);
info
->
Set
(
vtkAlgorithm
::
INPUT_REQUIRED_DATA_TYPE
(),
"vtk
OverlappingAMR
"
);
return
1
;
}
...
...
@@ -316,7 +316,7 @@ void vtkAMRVolumeMapper::Render(vtkRenderer *ren, vtkVolume *vol)
}
}
//----------------------------------------------------------------------------
void
vtkAMRVolumeMapper
::
UpdateResampler
(
vtkRenderer
*
ren
,
vtk
HierarchicalBoxDataSet
*
amr
)
void
vtkAMRVolumeMapper
::
UpdateResampler
(
vtkRenderer
*
ren
,
vtk
OverlappingAMR
*
amr
)
{
// Set the bias of the resample filter to be the projection direction
double
bvec
[
3
];
...
...
@@ -385,7 +385,7 @@ void vtkAMRVolumeMapper::UpdateResampler(vtkRenderer *ren, vtkHierarchicalBoxDat
}
//----------------------------------------------------------------------------
void
vtkAMRVolumeMapper
::
UpdateResamplerFrustrumMethod
(
vtkRenderer
*
ren
,
vtk
HierarchicalBoxDataSet
*
amr
)
vtk
OverlappingAMR
*
amr
)
{
// First we need to create a bouding box that represents the visible region
// of the camera in World Coordinates
...
...
@@ -590,8 +590,8 @@ void vtkAMRVolumeMapper::ProcessInformationRequest(vtkRenderer *ren,
this
->
HasMetaData
=
true
;
this
->
Resampler
->
SetDemandDrivenMode
(
1
);
}
vtk
HierarchicalBoxDataSet
*
amrMetaData
=
vtk
HierarchicalBoxDataSet
::
SafeDownCast
(
vtk
OverlappingAMR
*
amrMetaData
=
vtk
OverlappingAMR
::
SafeDownCast
(
input
->
Get
(
vtkCompositeDataPipeline
::
COMPOSITE_DATA_META_DATA
())
);
this
->
UpdateResampler
(
ren
,
amrMetaData
);
...
...
VolumeRendering/vtkAMRVolumeMapper.h
View file @
46761f2a
...
...
@@ -28,7 +28,7 @@
#include "vtkImageReslice.h" // for VTK_RESLICE_NEAREST, VTK_RESLICE_CUBIC
class
vtkAMRResampleFilter
;
class
vtk
HierarchicalBoxDataSet
;
class
vtk
OverlappingAMR
;
class
vtkSmartVolumeMapper
;
class
vtkUniformGrid
;
...
...
@@ -42,7 +42,7 @@ public:
// Description:
// Set the input data
virtual
void
SetInput
(
vtkDataSet
*
);
virtual
void
SetInput
(
vtk
HierarchicalBoxDataSet
*
);
virtual
void
SetInput
(
vtk
OverlappingAMR
*
);
virtual
void
SetInputConnection
(
int
port
,
vtkAlgorithmOutput
*
input
);
virtual
void
SetInputConnection
(
vtkAlgorithmOutput
*
input
)
{
this
->
SetInputConnection
(
0
,
input
);}
...
...
@@ -234,8 +234,8 @@ public:
void
ProcessInformationRequest
(
vtkRenderer
*
renderer
,
vtkInformation
*
info
,
vtkInformationVector
**
inputVector
,
vtkInformationVector
*
outputVector
);
void
UpdateResampler
(
vtkRenderer
*
ren
,
vtk
HierarchicalBoxDataSet
*
amr
);
void
UpdateResamplerFrustrumMethod
(
vtkRenderer
*
ren
,
vtk
HierarchicalBoxDataSet
*
amr
);
void
UpdateResampler
(
vtkRenderer
*
ren
,
vtk
OverlappingAMR
*
amr
);
void
UpdateResamplerFrustrumMethod
(
vtkRenderer
*
ren
,
vtk
OverlappingAMR
*
amr
);
//ETX
// Description:
...
...
Write
Preview
Supports
Markdown
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