|
||||||
|
Q. Is there a module to convert float data values to byte so that I can volume render my float data?Remember that AVS/Express will only volume render volumes (3D, 3-space Fields) that are uniform and contain scalar, byte data. If you have a 3D, 3-space Field that contains scalar float values, can you convert these float values to byte so that you can volume render the data? A. You can use the data_math module which allows you to convert the data type, but it does not scale the data. So unless you have float values between 0 and 255, they won't be valid byte values. You could use data_math with the equation set to this value: (#1 - input1.node_data[0].min) * 255.0 / (input1.node_data[0].max - input1.node_data[0].min) [#<n> is used by the UI of data_math to indicate the component of node_data used.] This converts to a byte and scales the data to fit between 0 and 255.
| |||||