<br>Hello all,<br><br>I am a relatively new VTK user.&nbsp; I am attempting to visualize an array of floats by manually entering them into a vtkImageData class.&nbsp; I have made a test program, but it appears that all the values are being mapped to 255 (the highest intensity value).&nbsp; I see that in the vtkImageData there is a vtkDataSet which has a ScalarRange which has the max and min set to 
1.0 and 0.0.&nbsp; Do I need to change this somehow to match my data?&nbsp; And if so, how would I go about it?<br><br>Any help would be greatly appreciated.&nbsp; I have attached my code up to right before rendering below.<br><br>Dave<br>
<br><span style="font-family: courier new,monospace;">&nbsp; vtkImageData *realData = vtkImageData::New();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp; //vtkFloatArray *scalars = vtkFloatArray::New();
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp; int dim[3];</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
&nbsp; dim[0] = 255;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp; dim[1] = 255;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
&nbsp; dim[2] = 255;</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp; float *temp;</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp; realData-&gt;SetDimensions(dim);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
&nbsp; realData-&gt;SetScalarTypeToFloat();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp; realData-&gt;SetNumberOfScalarComponents(1);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp; realData-&gt;AllocateScalars();</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
&nbsp; float *ptr = (float *) realData-&gt;GetScalarPointer();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp; for (int i = 0; i&lt;255*255*255 ; i++)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp; {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; &nbsp; *ptr++ = i;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp; }</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;//scalars-&gt;Delete();</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">vtkFixedPointVolumeRayCastMapper *volumeMapper = vtkFixedPointVolumeRayCastMapper::New();</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">volumeMapper-&gt;SetInput(realData);</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
&nbsp;vtkVolumeProperty *volumeProperty = vtkVolumeProperty::New();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;volumeProperty-&gt;IndependentComponentsOff();</span>
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;volumeProperty-&gt;SetScalarOpacity(tfun);</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;vtkVolume *newvol = vtkVolume::New();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;newvol-&gt;SetMapper(volumeMapper);
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;newvol-&gt;SetProperty(volumeProperty);</span><br>