Clean VolumeRenderingViewer code.
This commit is contained in:
@@ -13,13 +13,11 @@
|
||||
#include <vtkImageData.h>
|
||||
#include <vtkVolume.h>
|
||||
#include <vtkVolumeProperty.h>
|
||||
//#include <vtkSmartVolumeMapper.h>
|
||||
#include <vtkFixedPointVolumeRayCastMapper.h>
|
||||
#include <vtkGPUVolumeRayCastMapper.h>
|
||||
#include <vtkPiecewiseFunction.h>
|
||||
#include <vtkColorTransferFunction.h>
|
||||
#include <vtkCornerAnnotation.h>
|
||||
#include <vtkLODProp3D.h>
|
||||
|
||||
vtkStandardNewMacro(VolumeRenderingViewer);
|
||||
|
||||
@@ -217,7 +215,7 @@ void VolumeRenderingViewer::SetRenderer(vtkRenderer *arg) {
|
||||
}
|
||||
|
||||
void VolumeRenderingViewer::Render() {
|
||||
if (RenderWindow){
|
||||
if (RenderWindow && Interactor){
|
||||
Interactor->Render();
|
||||
}
|
||||
}
|
||||
@@ -241,6 +239,5 @@ void VolumeRenderingViewer::printFrameRate() {
|
||||
double fps = 1.0 / timeInSeconds;
|
||||
char buff[200]={0};
|
||||
sprintf(buff,"FPS:%3.0f", fps);
|
||||
// sprintf(buff,"FPS:%3.0f,bytes in use:%lld", fps,vtkGPUVolumeRayCastMapper::SafeDownCast(lowresMapper)->GetMaxMemoryInBytes());
|
||||
annotation->SetText(0,buff );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user