Program: bbtk
Module: $RCSfile: bbvtkVolumeRenderer.cxx,v $
Language: C++
- Date: $Date: 2009/07/08 14:23:08 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2009/08/07 15:06:26 $
+ Version: $Revision: 1.4 $
=========================================================================*/
/* ---------------------------------------------------------------------
mRayCastFunction = vtkVolumeRayCastCompositeFunction::New();
mMapper = vtkVolumeRayCastMapper::New();
mMapper->SetVolumeRayCastFunction(mRayCastFunction);
+ mMapper->AutoAdjustSampleDistancesOn();
+
+ _volumeProperty = vtkVolumeProperty::New();
+ _volumeProperty->SetInterpolationTypeToLinear();
+ _volumeProperty->ShadeOn();
+ _volumeProperty->DisableGradientOpacityOn();
+ //_volumeProperty->SetColor(_ctfun);
+ //_volumeProperty->SetScalarOpacity(_tfun );
+
mVolume = vtkVolume::New();
mVolume->SetMapper(mMapper);
+ mVolume->SetProperty(_volumeProperty );
// mMapper->ScalarVisibilityOff();
// mMapper->ImmediateModeRenderingOn();
Program: bbtk
Module: $RCSfile: bbvtkVolumeRenderer.h,v $
Language: C++
- Date: $Date: 2009/07/08 15:18:18 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2009/08/07 15:06:26 $
+ Version: $Revision: 1.5 $
=========================================================================*/
/* ---------------------------------------------------------------------
#include "vtkColorTransferFunction.h"
#include "bbvtk_EXPORT.h"
+#include "vtkVolumeProperty.h"
namespace bbvtk
{
vtkVolumeRayCastCompositeFunction * mRayCastFunction;
vtkVolumeRayCastMapper* mMapper;
vtkVolume* mVolume;
+ vtkVolumeProperty* _volumeProperty;
};
//=================================================================
Program: bbtk
Module: $RCSfile: bbwxvtkViewer3D.cxx,v $
Language: C++
- Date: $Date: 2009/07/08 15:18:25 $
- Version: $Revision: 1.18 $
+ Date: $Date: 2009/08/07 15:06:27 $
+ Version: $Revision: 1.19 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
bbSetOutputRenderer( renderer );
- if (bbGetInputIn1()!=NULL) {renderer->AddActor( bbGetInputIn1() ); }
+ /*if (bbGetInputIn1()!=NULL) {renderer->AddActor( bbGetInputIn1() ); }
if (bbGetInputIn2()!=NULL) {renderer->AddActor( bbGetInputIn2() ); }
if (bbGetInputIn3()!=NULL) {renderer->AddActor( bbGetInputIn3() ); }
if (bbGetInputIn4()!=NULL) {renderer->AddActor( bbGetInputIn4() ); }
renderer->ResetCamera();
double bounds[6];
renderer->ComputeVisiblePropBounds(bounds);
- renderer->ResetCameraClippingRange(bounds);
+ renderer->ResetCameraClippingRange(bounds);*/
} // renderer
} // w && firsttime
+ if(bbGetOutputRenderer()!=NULL){
+ vtkRenderer *renderer = w->GetRenderer();
+ if (bbGetInputIn1()!=NULL) {renderer->AddActor( bbGetInputIn1() ); }
+ if (bbGetInputIn2()!=NULL) {renderer->AddActor( bbGetInputIn2() ); }
+ if (bbGetInputIn3()!=NULL) {renderer->AddActor( bbGetInputIn3() ); }
+ if (bbGetInputIn4()!=NULL) {renderer->AddActor( bbGetInputIn4() ); }
+ if (bbGetInputIn5()!=NULL) {renderer->AddActor( bbGetInputIn5() ); }
+ renderer->ResetCamera();
+ double bounds[6];
+ renderer->ComputeVisiblePropBounds(bounds);
+ renderer->ResetCameraClippingRange(bounds);
+
+ }
+
if (w!=NULL) w->Update();
}