16 #ifndef vtkVolumeShaderComposer_h
17 #define vtkVolumeShaderComposer_h
42 std::string::size_type pos = 0;
44 while ((pos = source.find(search, 0)) != std::string::npos)
46 source.replace(pos, search.length(),
replace);
47 pos += search.length();
66 \n vec4 pos = in_projectionMatrix * in_modelViewMatrix *\
67 \n in_volumeMatrix * vec4(in_vertexPos.xyz, 1.0);\
68 \n gl_Position = pos;"
78 "\n // For point dataset, we offset the texture coordinate\
79 \n // to account for OpenGL treating voxel at the center of the cell.\
80 \n vec3 spacingSign = vec3(1.0);\
81 \n if (in_cellSpacing.x < 0.0)\
83 \n spacingSign.x = -1.0;\
85 \n if (in_cellSpacing.y < 0.0)\
87 \n spacingSign.y = -1.0;\
89 \n if (in_cellSpacing.z < 0.0)\
91 \n spacingSign.z = -1.0;\
93 \n vec3 uvx = spacingSign * (in_vertexPos - in_volumeExtentsMin) /\
94 \n (in_volumeExtentsMax - in_volumeExtentsMin);\
97 \n ip_textureCoords = uvx;\
101 \n vec3 delta = in_textureExtentsMax - in_textureExtentsMin;\
102 \n ip_textureCoords = (uvx * (delta - vec3(1.0)) + vec3(0.5)) / delta;\
113 \n uniform bool in_cellFlag;\
114 \n uniform vec3 in_cellSpacing;\
115 \n uniform mat4 in_modelViewMatrix;\
116 \n uniform mat4 in_projectionMatrix;\
117 \n uniform mat4 in_volumeMatrix;\
119 \n uniform vec3 in_volumeExtentsMin;\
120 \n uniform vec3 in_volumeExtentsMax;\
122 \n uniform vec3 in_textureExtentsMax;\
123 \n uniform vec3 in_textureExtentsMin;"
131 int vtkNotUsed(numberOfLights),
132 int lightingComplexity,
134 int independentComponents)
138 \nuniform sampler3D in_volume;\
139 \nuniform int in_noOfComponents;\
140 \nuniform int in_independentComponents;\
142 \nuniform sampler2D in_noiseSampler;\
144 \nuniform sampler2D in_depthSampler;\
147 \n// Camera position\
148 \nuniform vec3 in_cameraPos;\
150 \n// view and model matrices\
151 \nuniform mat4 in_volumeMatrix;\
152 \nuniform mat4 in_inverseVolumeMatrix;\
153 \nuniform mat4 in_projectionMatrix;\
154 \nuniform mat4 in_inverseProjectionMatrix;\
155 \nuniform mat4 in_modelViewMatrix;\
156 \nuniform mat4 in_inverseModelViewMatrix;\
157 \nuniform mat4 in_textureDatasetMatrix;\
158 \nuniform mat4 in_inverseTextureDatasetMatrix;\
159 \nuniform mat4 in_texureToEyeIt;\
162 \nuniform vec3 in_cellStep;\
163 \nuniform vec2 in_scalarsRange;\
164 \nuniform vec3 in_cellSpacing;\
166 \n// Sample distance\
167 \nuniform float in_sampleDistance;\
170 \nuniform vec3 in_cellScale;\
171 \nuniform vec2 in_windowLowerLeftCorner;\
172 \nuniform vec2 in_inverseOriginalWindowSize;\
173 \nuniform vec2 in_inverseWindowSize;\
174 \nuniform vec3 in_textureExtentsMax;\
175 \nuniform vec3 in_textureExtentsMin;\
177 \n// Material and lighting\
178 \nuniform vec3 in_diffuse;\
179 \nuniform vec3 in_ambient;\
180 \nuniform vec3 in_specular;\
181 \nuniform float in_shininess;\
182 \nuniform bool in_cellFlag;\
185 if (lightingComplexity > 0)
188 \nuniform bool in_twoSidedLighting;\
192 \nvec3 g_cellSpacing;\
193 \nfloat g_avgSpacing;"
197 if (lightingComplexity == 3)
200 \nvec4 g_fragWorldPos;\
201 \nuniform int in_numberOfLights;\
202 \nuniform vec3 in_lightAmbientColor[6];\
203 \nuniform vec3 in_lightDiffuseColor[6];\
204 \nuniform vec3 in_lightSpecularColor[6];\
205 \nuniform vec3 in_lightDirection[6];\
206 \nuniform vec3 in_lightPosition[6];\
207 \nuniform vec3 in_lightAttenuation[6];\
208 \nuniform float in_lightConeAngle[6];\
209 \nuniform float in_lightExponent[6];\
210 \nuniform int in_lightPositional[6];\
213 else if (lightingComplexity == 2)
216 \nvec4 g_fragWorldPos;\
217 \nuniform int in_numberOfLights;\
218 \nuniform vec3 in_lightAmbientColor[6];\
219 \nuniform vec3 in_lightDiffuseColor[6];\
220 \nuniform vec3 in_lightSpecularColor[6];\
221 \nuniform vec3 in_lightDirection[6];\
227 \nuniform vec3 in_lightAmbientColor[1];\
228 \nuniform vec3 in_lightDiffuseColor[1];\
229 \nuniform vec3 in_lightSpecularColor[1];\
230 \nvec4 g_lightPosObj;\
238 if (noOfComponents > 1 && independentComponents)
241 \nuniform vec4 in_componentWeight;");
251 int lightingComplexity)
254 \n // Get the 3D texture coordinates for lookup into the in_volume dataset\
255 \n g_dataPos = ip_textureCoords.xyz;\
257 \n // Eye position in object space\
258 \n g_eyePosObj = (in_inverseVolumeMatrix * vec4(in_cameraPos, 1.0));\
259 \n if (g_eyePosObj.w != 0.0)\
261 \n g_eyePosObj.x /= g_eyePosObj.w;\
262 \n g_eyePosObj.y /= g_eyePosObj.w;\
263 \n g_eyePosObj.z /= g_eyePosObj.w;\
264 \n g_eyePosObj.w = 1.0;\
267 \n // Getting the ray marching direction (in object space);\
268 \n vec3 rayDir = computeRayDirection();\
270 \n // Multiply the raymarching direction with the step size to get the\
271 \n // sub-step size we need to take at each raymarching step\
272 \n g_dirStep = (in_inverseTextureDatasetMatrix *\
273 \n vec4(rayDir, 0.0)).xyz * in_sampleDistance;\
275 \n g_dataPos += g_dirStep * (texture2D(in_noiseSampler, g_dataPos.xy).x);\
277 \n // Flag to deternmine if voxel should be considered for the rendering\
278 \n bool l_skip = false;");
283 \n // Light position in object space\
284 \n g_lightPosObj = (in_inverseVolumeMatrix *\
285 \n vec4(in_cameraPos, 1.0));\
286 \n if (g_lightPosObj.w != 0.0)\
288 \n g_lightPosObj.x /= g_lightPosObj.w;\
289 \n g_lightPosObj.y /= g_lightPosObj.w;\
290 \n g_lightPosObj.z /= g_lightPosObj.w;\
291 \n g_lightPosObj.w = 1.0;\
293 \n g_ldir = normalize(g_lightPosObj.xyz - ip_vertexPos);\
294 \n g_vdir = normalize(g_eyePosObj.xyz - ip_vertexPos);\
295 \n g_h = normalize(g_ldir + g_vdir);\
296 \n g_cellSpacing = vec3(in_cellSpacing[0],\
297 \n in_cellSpacing[1],\
298 \n in_cellSpacing[2]);\
299 \n g_avgSpacing = (g_cellSpacing[0] +\
300 \n g_cellSpacing[1] +\
301 \n g_cellSpacing[2])/3.0;\
302 \n // Adjust the aspect\
303 \n g_aspect.x = g_cellSpacing[0] * 2.0 / g_avgSpacing;\
304 \n g_aspect.y = g_cellSpacing[1] * 2.0 / g_avgSpacing;\
305 \n g_aspect.z = g_cellSpacing[2] * 2.0 / g_avgSpacing;"
311 \n g_xvec = vec3(in_cellStep[0], 0.0, 0.0);\
312 \n g_yvec = vec3(0.0, in_cellStep[1], 0.0);\
313 \n g_zvec = vec3(0.0, 0.0, in_cellStep[2]);"
342 int independentComponents,
343 std::map<int, std::string> gradientTableMap)
349 \nuniform sampler2D in_gradientTransferFunc;\
350 \nfloat computeGradientOpacity(vec4 grad)\
352 \n return texture2D(in_gradientTransferFunc, vec2(grad.w,0.0)).r;\
356 else if (noOfComponents > 1 && independentComponents &&
359 for (
int i = 0; i < noOfComponents; ++i)
361 shaderStr +=
std::string(
"\n uniform sampler2D ") +
366 \nfloat computeGradientOpacity(vec4 grad, int component)\
368 \n if (component == 0)\
370 \n return texture2D(in_gradientTransferFunc, vec2(grad.w,0.0)).r;\
372 \n if (component == 1)\
374 \n return texture2D(in_gradientTransferFunc1, vec2(grad.w,0.0)).r;\
376 \n if (component == 2)\
378 \n return texture2D(in_gradientTransferFunc2, vec2(grad.w,0.0)).r;\
380 \n if (component == 3)\
382 \n return texture2D(in_gradientTransferFunc3, vec2(grad.w,0.0)).r;\
392 \nvec4 computeGradient()\
396 \n g1.x = texture3D(in_volume, vec3(g_dataPos + g_xvec)).x;\
397 \n g1.y = texture3D(in_volume, vec3(g_dataPos + g_yvec)).x;\
398 \n g1.z = texture3D(in_volume, vec3(g_dataPos + g_zvec)).x;\
399 \n g2.x = texture3D(in_volume, vec3(g_dataPos - g_xvec)).x;\
400 \n g2.y = texture3D(in_volume, vec3(g_dataPos - g_yvec)).x;\
401 \n g2.z = texture3D(in_volume, vec3(g_dataPos - g_zvec)).x;\
402 \n g1 = g1 * in_volume_scale.r + in_volume_bias.r;\
403 \n g2 = g2 * in_volume_scale.r + in_volume_bias.r;\
404 \n return vec4((g1 - g2), -1.0);\
412 \nvec4 computeGradient()\
416 \n g1.x = texture3D(in_volume, vec3(g_dataPos + g_xvec)).x;\
417 \n g1.y = texture3D(in_volume, vec3(g_dataPos + g_yvec)).x;\
418 \n g1.z = texture3D(in_volume, vec3(g_dataPos + g_zvec)).x;\
419 \n g2.x = texture3D(in_volume, vec3(g_dataPos - g_xvec)).x;\
420 \n g2.y = texture3D(in_volume, vec3(g_dataPos - g_yvec)).x;\
421 \n g2.z = texture3D(in_volume, vec3(g_dataPos - g_zvec)).x;\
422 \n g1 = g1*in_volume_scale.r + in_volume_bias.r;\
423 \n g2 = g2*in_volume_scale.r + in_volume_bias.r;\
424 \n g1.x = in_scalarsRange[0] + (\
425 \n in_scalarsRange[1] - in_scalarsRange[0]) * g1.x;\
426 \n g1.y = in_scalarsRange[0] + (\
427 \n in_scalarsRange[1] - in_scalarsRange[0]) * g1.y;\
428 \n g1.z = in_scalarsRange[0] + (\
429 \n in_scalarsRange[1] - in_scalarsRange[0]) * g1.z;\
430 \n g2.x = in_scalarsRange[0] + (\
431 \n in_scalarsRange[1] - in_scalarsRange[0]) * g2.x;\
432 \n g2.y = in_scalarsRange[0] + (\
433 \n in_scalarsRange[1] - in_scalarsRange[0]) * g2.y;\
434 \n g2.z = in_scalarsRange[0] + (\
435 \n in_scalarsRange[1] - in_scalarsRange[0]) * g2.z;\
436 \n g2.xyz = g1 - g2.xyz;\
437 \n g2.x /= g_aspect.x;\
438 \n g2.y /= g_aspect.y;\
439 \n g2.z /= g_aspect.z;\
440 \n float grad_mag = sqrt(g2.x * g2.x +\
443 \n if (grad_mag > 0.0)\
445 \n g2.x /= grad_mag;\
446 \n g2.y /= grad_mag;\
447 \n g2.z /= grad_mag;\
451 \n g2.xyz = vec3(0.0, 0.0, 0.0);\
453 \n grad_mag = grad_mag * 1.0 / (0.25 * (in_scalarsRange[1] -\
454 \n (in_scalarsRange[0])));\
455 \n grad_mag = clamp(grad_mag, 0.0, 1.0);\
464 \nvec4 computeGradient()\
466 \n return vec4(0.0);\
478 int independentComponents,
479 int vtkNotUsed(numberOfLights),
480 int lightingComplexity)
484 \nvec4 computeLighting(vec4 color)\
486 \n vec4 finalColor = vec4(0.0);"
492 \n // Compute gradient function only once\
493 \n vec4 gradient = computeGradient();"
499 if (lightingComplexity == 1)
502 \n vec3 diffuse = vec3(0.0);\
503 \n vec3 specular = vec3(0.0);\
504 \n vec3 normal = gradient.xyz / in_cellSpacing;\
505 \n float normalLength = length(normal);\
506 \n if (normalLength > 0.0)\
508 \n normal = normalize(normal);\
512 \n normal = vec3(0.0, 0.0, 0.0);\
514 \n float nDotL = dot(normal, g_ldir);\
515 \n float nDotH = dot(normal, g_h);\
516 \n if (nDotL < 0.0 && in_twoSidedLighting)\
520 \n if (nDotH < 0.0 && in_twoSidedLighting)\
526 \n diffuse = nDotL * in_diffuse * in_lightDiffuseColor[0]\
529 \n specular = pow(nDotH, in_shininess) * in_specular *\
530 \n in_lightSpecularColor[0];\
531 \n // For the headlight, ignore the light's ambient color\
532 \n // for now as it is causing the old mapper tests to fail\
533 \n finalColor.xyz = in_ambient * color.rgb + diffuse + specular;"
536 else if (lightingComplexity == 2)
539 \n g_fragWorldPos = in_modelViewMatrix * in_volumeMatrix *\
540 \n in_textureDatasetMatrix * vec4(-g_dataPos, 1.0);\
541 \n if (g_fragWorldPos.w != 0.0)\
543 \n g_fragWorldPos /= g_fragWorldPos.w;\
545 \n vec3 vdir = normalize(g_fragWorldPos.xyz);\
546 \n vec3 normal = gradient.xyz;\
547 \n vec3 ambient = vec3(0.0);\
548 \n vec3 diffuse = vec3(0.0);\
549 \n vec3 specular = vec3(0.0);\
550 \n float normalLength = length(normal);\
551 \n if (normalLength > 0.0)\
553 \n normal = normalize((in_texureToEyeIt * vec4(normal, 0.0)).xyz);\
557 \n normal = vec3(0.0, 0.0, 0.0);\
559 \n for (int lightNum = 0; lightNum < in_numberOfLights; lightNum++)\
561 \n vec3 ldir = in_lightDirection[lightNum].xyz;\
562 \n vec3 h = normalize(ldir + vdir);\
563 \n float nDotH = dot(normal, h);\
564 \n if (nDotH < 0.0 && in_twoSidedLighting)\
568 \n float nDotL = dot(normal, ldir);\
569 \n if (nDotL < 0.0 && in_twoSidedLighting)\
575 \n diffuse += in_lightDiffuseColor[lightNum] * nDotL;\
579 \n specular = in_lightSpecularColor[lightNum] * pow(nDotH, in_shininess);\
581 \n ambient += in_lightAmbientColor[lightNum];\
583 \n finalColor.xyz = in_ambient * ambient +\
584 \n in_diffuse * diffuse * color.rgb +\
585 \n in_specular * specular;"
588 else if (lightingComplexity == 3)
591 \n g_fragWorldPos = in_modelViewMatrix * in_volumeMatrix *\
592 \n in_textureDatasetMatrix * vec4(g_dataPos, 1.0);\
593 \n if (g_fragWorldPos.w != 0.0)\
595 \n g_fragWorldPos /= g_fragWorldPos.w;\
597 \n vec3 viewDirection = normalize(-g_fragWorldPos.xyz);\
598 \n vec3 ambient = vec3(0,0,0);\
599 \n vec3 diffuse = vec3(0,0,0);\
600 \n vec3 specular = vec3(0,0,0);\
601 \n vec3 vertLightDirection;\
602 \n vec3 normal = normalize((in_texureToEyeIt * vec4(gradient.xyz, 0.0)).xyz);\
604 \n for (int lightNum = 0; lightNum < in_numberOfLights; lightNum++)\
606 \n float attenuation = 1.0;\
608 \n lightDir = in_lightDirection[lightNum];\
609 \n if (in_lightPositional[lightNum] == 0)\
611 \n vertLightDirection = lightDir;\
615 \n vertLightDirection = (g_fragWorldPos.xyz - in_lightPosition[lightNum]);\
616 \n float distance = length(vertLightDirection);\
617 \n vertLightDirection = normalize(vertLightDirection);\
618 \n attenuation = 1.0 /\
619 \n (in_lightAttenuation[lightNum].x\
620 \n + in_lightAttenuation[lightNum].y * distance\
621 \n + in_lightAttenuation[lightNum].z * distance * distance);\
622 \n // per OpenGL standard cone angle is 90 or less for a spot light\
623 \n if (in_lightConeAngle[lightNum] <= 90.0)\
625 \n float coneDot = dot(vertLightDirection, lightDir);\
626 \n // if inside the cone\
627 \n if (coneDot >= cos(radians(in_lightConeAngle[lightNum])))\
629 \n attenuation = attenuation * pow(coneDot, in_lightExponent[lightNum]);\
633 \n attenuation = 0.0;\
637 \n // diffuse and specular lighting\
638 \n float nDotL = dot(normal, vertLightDirection);\
639 \n if (nDotL < 0.0 && in_twoSidedLighting)\
645 \n float df = max(0.0, attenuation * nDotL);\
646 \n diffuse += (df * in_lightDiffuseColor[lightNum]);\
648 \n vec3 h = normalize(vertLightDirection + viewDirection);\
649 \n float nDotH = dot(normal, h);\
650 \n if (nDotH < 0.0 && in_twoSidedLighting)\
656 \n float sf = attenuation * pow(nDotH, in_shininess);\
657 \n specular += (sf * in_lightSpecularColor[lightNum]);\
659 \n ambient += in_lightAmbientColor[lightNum];\
661 \n finalColor.xyz = in_ambient * ambient + in_diffuse *\
662 \n diffuse * color.rgb + in_specular * specular;\
669 "\n finalColor = vec4(color.rgb, 0.0);"
676 \n if (gradient.w >= 0.0)\
678 \n color.a = color.a *\
679 \n computeGradientOpacity(gradient);\
683 else if (noOfComponents > 1 && independentComponents &&
687 \n if (gradient.w >= 0.0)\
689 \n for (int i = 0; i < in_noOfComponents; ++i)\
691 \n color.a = color.a *\
692 \n computeGradientOpacity(gradient, i) * in_componentWeight[i];\
698 \n finalColor.a = color.a;\
699 \n return finalColor;\
710 int vtkNotUsed(noOfComponents))
715 \nvec3 computeRayDirection()\
717 \n return normalize(ip_vertexPos.xyz - g_eyePosObj.xyz);\
723 \nuniform vec3 in_projectionDirection;\
724 \nvec3 computeRayDirection()\
726 \n return normalize((in_inverseVolumeMatrix *\
727 \n vec4(in_projectionDirection, 0.0)).xyz);\
737 int independentComponents,
738 std::map<int, std::string> colorTableMap)
740 if (noOfComponents == 1)
743 \nuniform sampler2D in_colorTransferFunc;\
744 \nvec4 computeColor(vec4 scalar, float opacity)\
746 \n return computeLighting(vec4(texture2D(in_colorTransferFunc,\
747 \n vec2(scalar.w, 0.0)).xyz, opacity));\
750 else if (noOfComponents > 1 && independentComponents)
753 std::ostringstream toString;
754 for (
int i = 0; i < noOfComponents; ++i)
756 shaderStr +=
std::string(
"\n uniform sampler2D ") +
761 \nvec4 computeColor(vec4 scalar, float opacity, int component)\
764 for (
int i = 0; i < noOfComponents; ++i)
768 \n if (component == " + toString.str() +
")");
772 \n return computeLighting(vec4(texture2D(\
773 \n in_colorTransferFunc");
774 shaderStr += (i == 0 ?
"" : toString.str());
776 \n scalar[" + toString.str() +
"],0.0)).xyz,\
788 else if (noOfComponents == 2&& !independentComponents)
791 \nuniform sampler2D in_colorTransferFunc;\
792 \nvec4 computeColor(vec4 scalar, float opacity)\
794 \n return computeLighting(vec4(texture2D(in_colorTransferFunc,\
795 \n vec2(scalar.x, 0.0)).xyz,\
802 \nvec4 computeColor(vec4 scalar, float opacity)\
804 \n return computeLighting(vec4(scalar.xyz, opacity));\
814 int independentComponents,
815 std::map<int, std::string> opacityTableMap)
817 if (noOfComponents > 1 && independentComponents)
820 std::ostringstream toString;
822 for (
int i = 0; i < noOfComponents; ++i)
824 shaderStr +=
std::string(
"\n uniform sampler2D ") +
830 \nfloat computeOpacity(vec4 scalar, int component)\
833 for (
int i = 0; i < noOfComponents; ++i)
837 \n if (component == " + toString.str() +
")");
841 \n return texture2D(in_opacityTransferFunc");
842 shaderStr += (i == 0 ?
"" : toString.str());
843 shaderStr +=
std::string(
",vec2(scalar[" + toString.str() +
"],0)).r;\
854 else if (noOfComponents == 2 && !independentComponents)
857 \nuniform sampler2D in_opacityTransferFunc;\
858 \nfloat computeOpacity(vec4 scalar)\
860 \n return texture2D(in_opacityTransferFunc, vec2(scalar.y, 0)).r;\
866 \nuniform sampler2D in_opacityTransferFunc;\
867 \nfloat computeOpacity(vec4 scalar)\
869 \n return texture2D(in_opacityTransferFunc, vec2(scalar.w, 0)).r;\
898 \n // We get data between 0.0 - 1.0 range\
899 \n bool l_firstValue = true;\
900 \n vec4 l_maxValue = vec4(0.0);"
906 \n //We get data between 0.0 - 1.0 range\
907 \n bool l_firstValue = true;\
908 \n vec4 l_minValue = vec4(1.0);"
914 \n //We get data between 0.0 - 1.0 range\
915 \n float l_sumValue = 0.0;"
931 int independentComponents = 0)
936 \n vec4 scalar = texture3D(in_volume, g_dataPos);"
940 if (noOfComponents == 1)
943 \n scalar.r = scalar.r*in_volume_scale.r + in_volume_bias.r;\
944 \n scalar = vec4(scalar.r,scalar.r,scalar.r,scalar.r);"
951 \n scalar = scalar*in_volume_scale + in_volume_bias;"
957 if (noOfComponents > 1)
959 if (!independentComponents)
962 \n if (l_maxValue.w < scalar.w || l_firstValue)\
964 \n l_maxValue = scalar;\
967 \n if (l_firstValue)\
969 \n l_firstValue = false;\
976 \n for (int i = 0; i < in_noOfComponents; ++i)\
978 \n if (l_maxValue[i] < scalar[i] || l_firstValue)\
980 \n l_maxValue[i] = scalar[i];\
983 \n if (l_firstValue)\
985 \n l_firstValue = false;\
993 \n if (l_maxValue.w < scalar.x || l_firstValue)\
995 \n l_maxValue.w = scalar.x;\
998 \n if (l_firstValue)\
1000 \n l_firstValue = false;\
1007 if (noOfComponents > 1)
1009 if (!independentComponents)
1012 \n if (l_minValue.w > scalar.w || l_firstValue)\
1014 \n l_minValue = scalar;\
1017 \n if (l_firstValue)\
1019 \n l_firstValue = false;\
1026 \n for (int i = 0; i < in_noOfComponents; ++i)\
1028 \n if (l_minValue[i] < scalar[i] || l_firstValue)\
1030 \n l_minValue[i] = scalar[i];\
1033 \n if (l_firstValue)\
1035 \n l_firstValue = false;\
1043 \n if (l_minValue.w > scalar.x || l_firstValue)\
1045 \n l_minValue.w = scalar.x;\
1048 \n if (l_firstValue)\
1050 \n l_firstValue = false;\
1057 if (noOfComponents > 1)
1059 if (!independentComponents)
1062 \n float opacity = computeOpacity(scalar);\
1063 \n l_sumValue = l_sumValue + opacity * scalar.x;"
1069 \n for (int i = 0; i < in_noOfComponents; ++i)\
1071 \n float opacity = computeOpacity(scalar, i);\
1072 \n l_sumValue[i] = l_sumValue[i] + opacity * scalar[i];\
1080 \n float opacity = computeOpacity(scalar);\
1081 \n l_sumValue = l_sumValue + opacity * scalar.x;"
1087 if (noOfComponents > 1 && independentComponents)
1090 \n vec4 color[4]; vec4 tmp = vec4(0.0);\
1091 \n float totalAlpha = 0.0;\
1092 \n for (int i = 0; i < in_noOfComponents; ++i)\
1095 if (!mask || !maskInput ||
1099 \n // Data fetching from the red channel of volume texture\
1100 \n color[i][3] = computeOpacity(scalar, i);\
1101 \n color[i] = computeColor(scalar, color[i][3], i);\
1102 \n totalAlpha += color[i][3] * in_componentWeight[i];\
1104 \n if (totalAlpha > 0.0)\
1106 \n for (int i = 0; i < in_noOfComponents; ++i)\
1108 \n tmp.x += color[i].x * color[i].w * in_componentWeight[i];\
1109 \n tmp.y += color[i].y * color[i].w * in_componentWeight[i];\
1110 \n tmp.z += color[i].z * color[i].w * in_componentWeight[i];\
1111 \n tmp.w += ((color[i].w * color[i].w)/totalAlpha);\
1114 \n g_fragColor = (1.0f - g_fragColor.a) * tmp + g_fragColor;"
1120 if (!mask || !maskInput ||
1124 \n g_srcColor = vec4(0.0);\
1125 \n g_srcColor.a = computeOpacity(scalar);\
1126 \n if (g_srcColor.a > 0.0)\
1128 \n g_srcColor = computeColor(scalar, g_srcColor.a);"
1133 \n // Opacity calculation using compositing:\
1134 \n // Here we use front to back compositing scheme whereby\
1135 \n // the current sample value is multiplied to the\
1136 \n // currently accumulated alpha and then this product\
1137 \n // is subtracted from the sample value to get the\
1138 \n // alpha from the previous steps. Next, this alpha is\
1139 \n // multiplied with the current sample colour\
1140 \n // and accumulated to the composited colour. The alpha\
1141 \n // value from the previous steps is then accumulated\
1142 \n // to the composited colour alpha.\
1143 \n g_srcColor.rgb *= g_srcColor.a;\
1144 \n g_fragColor = (1.0f - g_fragColor.a) * g_srcColor + g_fragColor;"
1147 if (!mask || !maskInput ||
1172 int independentComponents = 0)
1176 if (noOfComponents > 1 && independentComponents)
1179 \n g_srcColor = vec4(0);\
1180 \n for (int i = 0; i < in_noOfComponents; ++i)\
1182 \n vec4 tmp = computeColor(l_maxValue, computeOpacity(l_maxValue, i), i);\
1183 \n g_srcColor[0] += tmp[0] * tmp[3] * in_componentWeight[i];\
1184 \n g_srcColor[1] += tmp[1] * tmp[3] * in_componentWeight[i];\
1185 \n g_srcColor[2] += tmp[2] * tmp[3] * in_componentWeight[i];\
1186 \n g_srcColor[3] += tmp[3] * in_componentWeight[i];\
1188 \n g_fragColor = g_srcColor;"
1194 \n g_srcColor = computeColor(l_maxValue,\
1195 computeOpacity(l_maxValue));\
1196 \n g_fragColor.rgb = g_srcColor.rgb * g_srcColor.a;\
1197 \n g_fragColor.a = g_srcColor.a;"
1203 if (noOfComponents > 1 && independentComponents)
1206 \n g_srcColor = vec4(0);\
1207 \n for (int i = 0; i < in_noOfComponents; ++i)\
1209 \n vec4 tmp = computeColor(l_minValue, computeOpacity(l_minValue, i), i);\
1210 \n g_srcColor[0] += tmp[0] * tmp[3] * in_componentWeight[i];\
1211 \n g_srcColor[1] += tmp[1] * tmp[3] * in_componentWeight[i];\
1212 \n g_srcColor[2] += tmp[2] * tmp[3] * in_componentWeight[i];\
1213 \n g_srcColor[2] += tmp[3] * tmp[3] * in_componentWeight[i];\
1215 \n g_fragColor = g_srcColor;"
1221 \n g_srcColor = computeColor(l_minValue,\
1222 \n computeOpacity(l_minValue));\
1223 \n g_fragColor.rgb = g_srcColor.rgb * g_srcColor.a;\
1224 \n g_fragColor.a = g_srcColor.a;"
1230 if (noOfComponents > 1 && independentComponents)
1233 \n l_sumValue = clamp(l_sumValue, 0.0, 1.0);\
1234 \n g_fragColor = vec4(l_sumValue);"
1240 \n l_sumValue = clamp(l_sumValue, 0.0, 1.0);\
1241 \n g_fragColor = vec4(vec3(l_sumValue), 1.0);"
1273 \n // Minimum texture access coordinate\
1274 \n vec3 l_tex_min = vec3(0.0);\
1275 \n vec3 l_tex_max = vec3(1.0);\
1276 \n if (!in_cellFlag)\
1278 \n vec3 delta = in_textureExtentsMax - in_textureExtentsMin;\
1279 \n l_tex_min = vec3(0.5) / delta;\
1280 \n l_tex_max = (delta - vec3(0.5)) / delta;\
1283 \n // Flag to indicate if the raymarch loop should terminate \
1284 \n bool stop = false;\
1286 \n // 2D Texture fragment coordinates [0,1] from fragment coordinates \
1287 \n // the frame buffer texture has the size of the plain buffer but \
1288 \n // we use a fraction of it. The texture coordinates is less than 1 if \
1289 \n // the reduction factor is less than 1. \
1290 \n // Device coordinates are between -1 and 1. We need texture \
1291 \n // coordinates between 0 and 1 the in_depthSampler buffer has the \
1292 \n // original size buffer. \
1293 \n vec2 fragTexCoord = (gl_FragCoord.xy - in_windowLowerLeftCorner) *\
1294 \n in_inverseWindowSize;\
1295 \n float l_terminatePointMax = 0.0;\
1298 \n vec4 l_depthValue = vec4(1.0,1.0,1.0,1.0);\
1300 \n vec4 l_depthValue = texture2D(in_depthSampler, fragTexCoord);\
1303 \n if(gl_FragCoord.z >= l_depthValue.x)\
1308 \n // color buffer or max scalar buffer have a reduced size.\
1309 \n fragTexCoord = (gl_FragCoord.xy - in_windowLowerLeftCorner) *\
1310 \n in_inverseOriginalWindowSize;\
1312 \n // Compute max number of iterations it will take before we hit\
1313 \n // the termination point\
1315 \n // Abscissa of the point on the depth buffer along the ray.\
1316 \n // point in texture coordinates\
1317 \n vec4 terminatePoint;\
1318 \n terminatePoint.x = (gl_FragCoord.x - in_windowLowerLeftCorner.x) * 2.0 *\
1319 \n in_inverseWindowSize.x - 1.0;\
1320 \n terminatePoint.y = (gl_FragCoord.y - in_windowLowerLeftCorner.y) * 2.0 *\
1321 \n in_inverseWindowSize.y - 1.0;\
1322 \n terminatePoint.z = (2.0 * l_depthValue.x - (gl_DepthRange.near +\
1323 \n gl_DepthRange.far)) / gl_DepthRange.diff;\
1324 \n terminatePoint.w = 1.0;\
1326 \n // From normalized device coordinates to eye coordinates.\
1327 \n // in_projectionMatrix is inversed because of way VT\
1328 \n // From eye coordinates to texture coordinates\
1329 \n terminatePoint = in_inverseTextureDatasetMatrix *\
1330 \n in_inverseVolumeMatrix *\
1331 \n in_inverseModelViewMatrix *\
1332 \n in_inverseProjectionMatrix *\
1334 \n terminatePoint /= terminatePoint.w;\
1336 \n l_terminatePointMax = length(terminatePoint.xyz - g_dataPos.xyz) /\
1337 \n length(g_dirStep);\
1338 \n float l_currentT = 0.0;");
1347 \n // sign function performs component wise operation and returns -1\
1348 \n // if the difference is less than 0, 0 if equal to 0, and 1 if\
1349 \n // above 0. So if the ray is inside the volume, dot product will\
1351 \n stop = dot(sign(g_dataPos - l_tex_min), sign(l_tex_max - g_dataPos))\
1354 \n // If the stopping condition is true we brek out of the ray marching\
1360 \n // Early ray termination\
1361 \n // if the currently composited colour alpha is already fully saturated\
1362 \n // we terminated the loop or if we have hit an obstacle in the\
1363 \n // direction of they ray (using depth buffer) we terminate as well.\
1364 \n if((g_fragColor.a > (1.0 - 1.0/255.0)) || \
1365 \n l_currentT >= l_terminatePointMax)\
1399 \nuniform float cropping_planes[6];\
1400 \nuniform int cropping_flags [32];\
1401 \n// X: axis = 0, Y: axis = 1, Z: axis = 2\
1402 \n// cp Cropping plane bounds (minX, maxX, minY, maxY, minZ, maxZ)\
1403 \nint computeRegionCoord(float cp[6], vec3 pos, int axis)\
1405 \n int cpmin = axis * 2;\
1406 \n int cpmax = cpmin + 1;\
1408 \n if (pos[axis] < cp[cpmin])\
1412 \n else if (pos[axis] >= cp[cpmin] &&\
1413 \n pos[axis] < cp[cpmax])\
1417 \n else if (pos[axis] >= cp[cpmax])\
1424 \nint computeRegion(float cp[6], vec3 pos)\
1426 \n return (computeRegionCoord(cp, pos, 0) +\
1427 \n (computeRegionCoord(cp, pos, 1) - 1) * 3 +\
1428 \n (computeRegionCoord(cp, pos, 2) - 1) * 9);\
1443 \n // Convert cropping region to texture space\
1444 \n float cropping_planes_ts[6];\
1445 \n mat4 datasetToTextureMat = in_inverseTextureDatasetMatrix;\
1447 \n vec4 temp = vec4(cropping_planes[0], 0.0, 0.0, 1.0);\
1448 \n temp = datasetToTextureMat * temp;\
1449 \n if (temp[3] != 0.0)\
1451 \n temp[0] /= temp[3];\
1453 \n cropping_planes_ts[0] = temp[0];\
1455 \n temp = vec4(cropping_planes[1], 0.0, 0.0, 1.0);\
1456 \n temp = datasetToTextureMat * temp;\
1457 \n if (temp[3] != 0.0)\
1459 \n temp[0] /= temp[3];\
1461 \n cropping_planes_ts[1] = temp[0];\
1463 \n temp = vec4(0.0, cropping_planes[2], 0.0, 1.0);\
1464 \n temp = datasetToTextureMat * temp;\
1465 \n if (temp[3] != 0.0)\
1467 \n temp[1] /= temp[3];\
1469 \n cropping_planes_ts[2] = temp[1];\
1471 \n temp = vec4(0.0, cropping_planes[3], 0.0, 1.0);\
1472 \n temp = datasetToTextureMat * temp;\
1473 \n if (temp[3] != 0.0)\
1475 \n temp[1] /= temp[3];\
1477 \n cropping_planes_ts[3] = temp[1];\
1479 \n temp = vec4(0.0, 0.0, cropping_planes[4], 1.0);\
1480 \n temp = datasetToTextureMat * temp;\
1481 \n if (temp[3] != 0.0)\
1483 \n temp[2] /= temp[3];\
1485 \n cropping_planes_ts[4] = temp[2];\
1487 \n temp = vec4(0.0, 0.0, cropping_planes[5], 1.0);\
1488 \n temp = datasetToTextureMat * temp;\
1489 \n if (temp[3] != 0.0)\
1491 \n temp[2] /= temp[3];\
1493 \n cropping_planes_ts[5] = temp[2];"
1507 \n // Determine region\
1508 \n int regionNo = computeRegion(cropping_planes_ts, g_dataPos);\
1510 \n // Do & operation with cropping flags\
1511 \n // Pass the flag that its Ok to sample or not to sample\
1512 \n if (cropping_flags[regionNo] == 0)\
1514 \n // Skip this voxel\
1556 \nfloat clippingPlanesTexture[48];\
1557 \nint clippingPlanesSize = int(in_clippingPlanes[0]);\
1559 \nmat4 world_to_texture_mat = in_inverseTextureDatasetMatrix *\
1560 \n in_inverseVolumeMatrix;\
1561 \nfor (int i = 0; i < clippingPlanesSize; i = i + 6)\
1563 \n vec4 origin = vec4(in_clippingPlanes[i + 1],\
1564 \n in_clippingPlanes[i + 2],\
1565 \n in_clippingPlanes[i + 3], 1.0);\
1566 \n vec4 normal = vec4(in_clippingPlanes[i + 4],\
1567 \n in_clippingPlanes[i + 5],\
1568 \n in_clippingPlanes[i + 6], 0.0);\
1570 \n origin = world_to_texture_mat * origin;\
1571 \n normal = world_to_texture_mat * normal;\
1573 \n if (origin[3] != 0.0)\
1575 \n origin[0] = origin[0] / origin[3];\
1576 \n origin[1] = origin[1] / origin[3];\
1577 \n origin[2] = origin[2] / origin[3];\
1579 \n if (normal[3] != 0.0)\
1581 \n normal[0] = normal[0] / normal[3];\
1582 \n normal[1] = normal[1] / normal[3];\
1583 \n normal[2] = normal[2] / normal[3];\
1586 \n clippingPlanesTexture[i] = origin[0];\
1587 \n clippingPlanesTexture[i + 1] = origin[1];\
1588 \n clippingPlanesTexture[i + 2] = origin[2];\
1590 \n clippingPlanesTexture[i + 3] = normal[0];\
1591 \n clippingPlanesTexture[i + 4] = normal[1];\
1592 \n clippingPlanesTexture[i + 5] = normal[2];\
1610 \n for (int i = 0; i < (clippingPlanesSize) && !l_skip; i = i + 6)\
1612 \n if (dot(vec3(g_dataPos - vec3(clippingPlanesTexture[i],\
1613 \n clippingPlanesTexture[i + 1],\
1614 \n clippingPlanesTexture[i + 2])),\
1615 \n vec3(clippingPlanesTexture[i + 3],\
1616 \n clippingPlanesTexture[i + 4],\
1617 \n clippingPlanesTexture[i + 5])) < 0)\
1641 int vtkNotUsed(maskType))
1643 if (!mask || !maskInput)
1661 if (!mask || !maskInput ||
1669 \nvec4 maskValue = texture3D(in_mask, g_dataPos);\
1670 \nif(maskValue.r <= 0.0)\
1686 if (!mask || !maskInput ||
1694 \nuniform float in_maskBlendFactor;\
1695 \nuniform sampler2D in_mask1;\
1696 \nuniform sampler2D in_mask2;"
1710 if (!mask || !maskInput ||
1718 \nvec4 scalar = texture3D(in_volume, g_dataPos);");
1721 if (noOfComponents == 1)
1724 \n scalar.r = scalar.r*in_volume_scale.r + in_volume_bias.r;\
1725 \n scalar = vec4(scalar.r,scalar.r,scalar.r,scalar.r);"
1732 \n scalar = scalar*in_volume_scale + in_volume_bias;"
1737 \nif (in_maskBlendFactor == 0.0)\
1739 \n g_srcColor = computeColor(scalar, computeOpacity(scalar));\
1743 \n float opacity = computeOpacity(scalar);\
1744 \n // Get the mask value at this same location\
1745 \n vec4 maskValue = texture3D(in_mask, g_dataPos);\
1746 \n if(maskValue.r == 0.0)\
1748 \n g_srcColor = computeColor(scalar, opacity);\
1752 \n if (maskValue.r == 1.0/255.0)\
1754 \n g_srcColor = texture2D(in_mask1, vec2(scalar.w,0.0));\
1758 \n // maskValue.r == 2.0/255.0\
1759 \n g_srcColor = texture2D(in_mask2, vec2(scalar.w,0.0));\
1761 \n g_srcColor.a = 1.0;\
1762 \n if(in_maskBlendFactor < 1.0)\
1764 \n g_srcColor = (1.0 - in_maskBlendFactor) *\
1765 \n computeColor(scalar, opacity) +\
1766 \n in_maskBlendFactor * g_srcColor;\
1769 \n g_srcColor.a = opacity;\
1781 \n vec3 l_opaqueFragPos = g_dataPos;\
1782 \n bool l_updateDepth = true;"
1792 \n if(!l_skip && g_srcColor.a > 0.0 && l_updateDepth)\
1794 \n l_opaqueFragPos = g_dataPos;\
1795 \n l_updateDepth = false;\
1806 \n vec4 depthValue = in_projectionMatrix * in_modelViewMatrix *\
1807 \n in_volumeMatrix * in_textureDatasetMatrix *\
1808 \n vec4(l_opaqueFragPos, 1.0);\
1809 \n gl_FragData[1] = vec4(vec3((depthValue.z/depthValue.w) * 0.5 + 0.5),\
1815 #endif // vtkVolumeShaderComposer_h
std::string ShadingExit(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *mapper, vtkVolume *vtkNotUsed(vol), int noOfComponents, int independentComponents=0)
std::string BaseImplementation(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol))
represents a volume (data & properties) in a rendered scene
std::string CroppingDeclarationVertex(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol))
std::string CompositeMaskImplementation(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol), vtkImageData *maskInput, vtkVolumeMask *mask, int maskType, int noOfComponents)
Abstract class for a volume mapper.
std::string BinaryMaskDeclaration(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol), vtkImageData *maskInput, vtkVolumeMask *mask, int vtkNotUsed(maskType))
virtual int GetBlendMode()
std::string BaseInit(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vol, int lightingComplexity)
abstract specification for renderers
std::string CroppingDeclarationFragment(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *mapper, vtkVolume *vtkNotUsed(vol))
std::string ShadingDeclarationFragment(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol))
std::string TerminationExit(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol))
std::string ShadingDeclarationVertex(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol))
std::string BinaryMaskImplementation(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol), vtkImageData *maskInput, vtkVolumeMask *mask, int maskType)
std::string ComputeLightingDeclaration(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vol, int noOfComponents, int independentComponents, int vtkNotUsed(numberOfLights), int lightingComplexity)
virtual vtkPlaneCollection * GetClippingPlanes()
vtkCamera * GetActiveCamera()
std::string ClippingImplementation(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *mapper, vtkVolume *vtkNotUsed(vol))
std::string RenderToImageDepthInit(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol))
std::string TerminationInit(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol))
std::string CroppingImplementation(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *mapper, vtkVolume *vtkNotUsed(vol))
std::string TerminationImplementation(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol))
std::string ClippingDeclarationVertex(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol))
std::string ClippingExit(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol))
std::string CompositeMaskDeclarationFragment(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol), vtkImageData *maskInput, vtkVolumeMask *mask, int maskType)
topologically and geometrically regular array of data
bool HasGradientOpacity(int index=0)
std::string RenderToImageDepthExit(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol))
std::string RenderToImageDepthImplementation(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol))
std::string ShadingImplementation(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *mapper, vtkVolume *vtkNotUsed(vol), vtkImageData *maskInput, vtkVolumeMask *mask, int maskType, int noOfComponents, int independentComponents=0)
virtual int GetParallelProjection()
std::string ComputeClipPositionImplementation(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol))
std::string ComputeRayDirectionDeclaration(vtkRenderer *ren, vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol), int vtkNotUsed(noOfComponents))
std::string BaseDeclarationFragment(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol), int vtkNotUsed(numberOfLights), int lightingComplexity, int noOfComponents, int independentComponents)
std::string ShadingInit(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *mapper, vtkVolume *vtkNotUsed(vol))
represents the common properties for rendering a volume.
std::string CroppingExit(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol))
std::string ClippingDeclarationFragment(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol))
std::string ComputeTextureCoordinates(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol))
std::string ClippingInit(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *mapper, vtkVolume *vtkNotUsed(vol))
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
std::string ComputeGradientDeclaration(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vol, int noOfComponents, int independentComponents, std::map< int, std::string > gradientTableMap)
std::string CroppingInit(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *mapper, vtkVolume *vtkNotUsed(vol))
vtkVolumeProperty * GetProperty()
virtual int GetCropping()
std::string replace(std::string source, const std::string &search, const std::string replace, bool all)
std::string TerminationDeclarationVertex(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol))
std::string BaseDeclarationVertex(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol))
std::string BaseExit(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol))
std::string TerminationDeclarationFragment(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol))
std::string ComputeOpacityDeclaration(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol), int noOfComponents, int independentComponents, std::map< int, std::string > opacityTableMap)
std::string ComputeColorDeclaration(vtkRenderer *vtkNotUsed(ren), vtkVolumeMapper *vtkNotUsed(mapper), vtkVolume *vtkNotUsed(vol), int noOfComponents, int independentComponents, std::map< int, std::string > colorTableMap)