[vtkusers] vtkGPUVolumeRayCastMapper: Updateing ImageData after first Rendering?
Willy
Wiggerl at Linhuber.info
Wed Feb 22 03:53:17 EST 2017
I Changed (619-626 in my last post):
// Cache the array's scalar range
for (int n = 0; n < noOfComponents; ++n)
{
double* range = this->Scalars->GetRange(n);
for (int i = 0; i < 2; ++i)
{
this->ScalarRange[n][i] = range[i];
}
}
to
if(scalarType == VTK_UNSIGNED_CHAR){
for (int n = 0; n < noOfComponents; ++n) {
this->ScalarRange[n][0] = 0;
this->ScalarRange[n][1] = 255;
}
}else if(scalarType == VTK_UNSIGNED_SHORT){
for (int n = 0; n < noOfComponents; ++n) {
this->ScalarRange[n][0] = 0;
this->ScalarRange[n][1] = 65535;
}
}else {
// Cache the array's scalar range
for (int n = 0; n < noOfComponents; ++n)
{
double* range = this->Scalars->GetRange(n);
for (int i = 0; i < 2; ++i)
{
this->ScalarRange[n][i] = range[i];
}
}
}
I dont know if thats the correct way to do it, but for me it seems to work.
Willy
--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkGPUVolumeRayCastMapper-Updateing-ImageData-after-first-Rendering-tp5742153p5742275.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list