_volumePlanes = vtkPlanes::New();
_compositeFunction = vtkVolumeRayCastCompositeFunction::New();
+ _MIPFunction = vtkVolumeRayCastMIPFunction::New();
+
_volumeMapper = vtkVolumeRayCastMapper::New();
_volumeMapper->SetVolumeRayCastFunction(_compositeFunction);
_volumeMapper->SetClippingPlanes( _volumePlanes );
_volumeMapper->AutoAdjustSampleDistancesOn();
_volumeProperty = vtkVolumeProperty::New();
_volumeProperty->SetInterpolationTypeToLinear();
- _volumeProperty->ShadeOn();
+ //_volumeProperty->ShadeOn();
_volumeProperty->DisableGradientOpacityOn();
_volumeProperty->SetColor(_ctfun);
_volumeProperty->SetScalarOpacity(_tfun );
/**
** Check if the variables are setted correctly
**/
-void wxMaracasMultipleVolumeRendererManagerData::checkInvariant(){
-
+void wxMaracasMultipleVolumeRendererManagerData::checkInvariant()throw (char *){
+ if(!_compositeFunction){
+ throw "No composite function initialized";
+ }
+ if(!_MIPFunction){
+ throw "No MIP function initialized";
+ }
+ if(!_volumeMapper){
+ throw "No volume mapper initialized";
+ }
}
/**
_dataname = dataname;
}
+void wxMaracasMultipleVolumeRendererManagerData::changeCompositeMIPFunction(int function) throw (char *){
+ checkInvariant();
+ if(function == 0){
+ _volumeMapper->SetVolumeRayCastFunction(_compositeFunction);
+ }else{
+ _volumeMapper->SetVolumeRayCastFunction(_MIPFunction);
+ }
+
+}