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>" render clipped 1 ERROR (x501) Invalid value</div>
<div>Assertion failed: "pre: valid_current_reduction_range" && this->ReductionFactor></div><div>0.0 && this->ReductionFactor<=1.0, file ..\..\vtk-5.8.0\VolumeRendering\vtkOpenG</div><div>
LGPUVolumeRayCastMapper.cxx, line 3906 "</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<vtkCamera> cam = vtkSmartPointer<vtkCamera>::New(); </div><div>cam->SetPosition(0.0, 0.345, 0.222); // set position to display offset</div><div>cam->SetFocalPoint(0.0, 0.0, 0.0);<span class="Apple-tab-span" style="white-space:pre">        </span>// set cam LookAt</div>
<div>cam->SetViewUp(0.0, 1.0, 0.0);<span class="Apple-tab-span" style="white-space:pre">                        </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 "real" 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->SetMaxMemoryInBytes(536870912); </div><div><div>dcmMapper->SetMaxMemoryFraction(0.80);<span class="Apple-tab-span" style="white-space:pre">                                </span>// trigger GPU </div>
<div>dcmMapper->SetAutoAdjustSampleDistances(0); // no adjust sample distance</div><div>dcmMapper->SetImageSampleDistance(0.5);</div></div><div>dcmMapper->SetInput(dcmVImage);</div><div>dcmMapper->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 "ghostly-flat" = "spacing-camera-noauto-1x.jpg"</div>
<div>2 - With SetAutoAdjustSampleDistances(1), only higher density values are rendered = "Spacing-camera-auto.jpg"</div><div><br></div><div>What I would like to have as a rendered image is the attached image "normal.jpg" 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 "fixed-additive.jpg") using "additive" 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>