Hi everyone!<div><br></div><div>In case someone has this issue in the future... its not a problem of the mapper, its an issue of resolution of the Volume Properties. </div><div><br></div><div>You will need to set the appropriate scale for the scalar opacity units. In my case 0.001 (see below)</div>
<div><br></div><div>Hope it helps. <br>S</div><div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer&lt;vtkVolumeProperty&gt; dcmVolProp = vtkSmartPointer&lt;vtkVolumeProperty&gt;::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>dcmVolProp-&gt;SetScalarOpacityUnitDistance(0.001); </div><br><div class="gmail_quote">On Mon, Jan 23, 2012 at 8:29 PM, Sergio Aguirre <span dir="ltr">&lt;<a href="mailto:sergio.aguirre@gmail.com">sergio.aguirre@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">links to images here <div><br></div><div>spacing-camera-noauto-1X - <a href="http://dl.dropbox.com/u/8559744/spacing-camera-noauto-1x.jpg" target="_blank">http://dl.dropbox.com/u/8559744/spacing-camera-noauto-1x.jpg</a> </div>
<div><br></div>
<div>spacing-camera-auto - <a href="http://dl.dropbox.com/u/8559744/spacing-camera-auto.jpg" target="_blank">http://dl.dropbox.com/u/8559744/spacing-camera-auto.jpg</a>
</div><div><br></div><div>normal - <a href="http://dl.dropbox.com/u/8559744/normal.jpg" target="_blank">http://dl.dropbox.com/u/8559744/normal.jpg</a> 
</div><div><br></div><div>fixed-additive - <a href="http://dl.dropbox.com/u/8559744/fixed-additive.jpg" target="_blank">http://dl.dropbox.com/u/8559744/fixed-additive.jpg</a> </div><div class="HOEnZb"><div class="h5"><div>
<br></div><div><br><br><div class="gmail_quote">On Mon, Jan 23, 2012 at 8:25 PM, Sergio Aguirre <span dir="ltr">&lt;<a href="mailto:sergio.aguirre@gmail.com" target="_blank">sergio.aguirre@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi everyone <div><br></div><div>I am trying to render some DICOM volumes using vtkGPUolumeRayCastMapper however it fails and I get the following message: </div>

<div><br></div><div>&quot; render clipped 1 ERROR (x501) Invalid value</div>
<div>Assertion failed: &quot;pre: valid_current_reduction_range&quot; &amp;&amp; this-&gt;ReductionFactor&gt;</div><div>0.0 &amp;&amp; this-&gt;ReductionFactor&lt;=1.0, file ..\..\vtk-5.8.0\VolumeRendering\vtkOpenG</div>

<div>
LGPUVolumeRayCastMapper.cxx, line 3906 &quot;</div><div><br></div><div>I believe this is a problem caused by my pipeline set up. I have a requirement to have the following camera configuration: </div><div><br></div><div>

<div>
vtkSmartPointer&lt;vtkCamera&gt; cam = vtkSmartPointer&lt;vtkCamera&gt;::New(); </div><div>cam-&gt;SetPosition(0.0, 0.345, 0.222); // set position to display offset</div><div>cam-&gt;SetFocalPoint(0.0, 0.0, 0.0);<span style="white-space:pre-wrap">        </span>// set cam LookAt</div>


<div>cam-&gt;SetViewUp(0.0, 1.0, 0.0);<span style="white-space:pre-wrap">                        </span>// set View up</div></div><div><br></div><div>Since the camera is looking at a fixed area in space, I need to scale my DICOM images to fit in this space - I do this in ITK using a filter called itkChangeInformationImageFilter. The result is that each voxel has &quot;real&quot; size and spacing (e.g. if the dicom tags say that X,Y spacing is 0.625mm and Z spacing is 1mm then this filter allows me to import voxels of 0.000625, 0.000625, 0.001 size or smaller. </div>


<div><br></div><div>My configuration of the vtkGPUolumeRayCastMapper is as follows: </div><div>dcmMapper-&gt;SetMaxMemoryInBytes(536870912); </div><div><div>dcmMapper-&gt;SetMaxMemoryFraction(0.80);<span style="white-space:pre-wrap">                                </span>// trigger GPU </div>


<div>dcmMapper-&gt;SetAutoAdjustSampleDistances(0); // no adjust sample distance</div><div>dcmMapper-&gt;SetImageSampleDistance(0.5);</div></div><div>dcmMapper-&gt;SetInput(dcmVImage);</div><div>dcmMapper-&gt;SetBlendModeToComposite();</div>


<div><br></div><div>The above configuration fails. </div><div><br></div><div>I tested other configurations with the following results: </div><div><br></div><div>1 - With SetAutoAdjustSampleDistances(0), SetImageSampleDistances(1.0) the image is &quot;ghostly-flat&quot; = &quot;spacing-camera-noauto-1x.jpg&quot;</div>


<div>2 - With SetAutoAdjustSampleDistances(1), only higher density values are rendered = &quot;Spacing-camera-auto.jpg&quot;</div><div><br></div><div>What I would like to have as a rendered image is the attached image &quot;normal.jpg&quot; which I rendered with SetAutoAdjustSampleDistances(1) and no settings on my camera or re-sizing of the images in ITK. </div>


<div><br></div><div>I can achieve the desired output with vtkFixedPointVolumeRayCastMapper (see &quot;fixed-additive.jpg&quot;) using &quot;additive&quot; blending - but I would rather use the video card for volume rendering. </div>


<div><br></div><div>Is this something I can fix or maybe repair modifying some code of vtkOpenGLGPUVolumeRayCastMapper? or do I need a larger video card? I am using a Quadro FX 3700 </div><div><br></div><div>Any suggestions are appreciated. <br>


<br>Thank you, </div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>