----------------------------------------------------------------------------
| 3156 | |
| 3157 | //---------------------------------------------------------------------------- |
| 3158 | int vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::GetComponentMode( |
| 3159 | vtkVolumeProperty* prop, vtkDataArray* array) const |
| 3160 | { |
| 3161 | if (prop->GetIndependentComponents()) |
| 3162 | { |
| 3163 | return VolumeInput::INDEPENDENT; |
| 3164 | } |
| 3165 | else |
| 3166 | { |
| 3167 | const auto numComp = array->GetNumberOfComponents(); |
| 3168 | if (numComp == 1 || numComp == 2) |
| 3169 | return VolumeInput::LA; |
| 3170 | else if (numComp == 4) |
| 3171 | return VolumeInput::RGBA; |
| 3172 | else if (numComp == 3) |
| 3173 | { |
| 3174 | vtkGenericWarningMacro(<< "3 dependent components (e.g. RGB) are not supported." |
| 3175 | "Only 2 (LA) and 4 (RGBA) supported."); |
| 3176 | return VolumeInput::INVALID; |
| 3177 | } |
| 3178 | else |
| 3179 | return VolumeInput::INVALID; |
| 3180 | } |
| 3181 | } |
| 3182 | |
| 3183 | //------------------------------------------------------------------------------ |
| 3184 | void vtkOpenGLGPUVolumeRayCastMapper::GPURender(vtkRenderer* ren, vtkVolume* vol) |
no test coverage detected