Karthik <div><br></div><div>Thank you for the reply. </div><div><br></div><div>As you probably saw I was using vtkGPUVolumeRayCastMapper, I am running a win7 64bit system with a Xeon quad core processor and an Nvidia Quadro FX 3700. </div>
<div><br></div><div>I expected it to perform well. But after modifying the transfer function parameters I would still get very little of the image visible using either SetBlendModeToComposite OR SetBlendModeToAdditive</div>
<div><br></div><div>Minimum and Maximum Intensity Projection worked OK, but its not really the visual effect I am looking for. </div><div><br></div><div>I then switched to vtkFixedPointVolumeRayCastMapper and composite and additive look fine ONLY when setting the LockSampleDistanceToInputSpacingOn() </div>
<div><br></div><div>My data sets are rather large (800+ Dicom Images), could it be that the render time allotted to the volume is not enough? </div><div><br></div><div>I will continue to try and get the GPU one working, but will use fixedpoint to move forward. </div>
<div><br></div><div>Thank you again!</div><div>Sergio</div><div><br><div class="gmail_quote">On Mon, Oct 10, 2011 at 9:02 PM, Karthik Krishnan <span dir="ltr"><<a href="mailto:karthik.krishnan@kitware.com">karthik.krishnan@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="gmail_quote"><div class="im">On Tue, Oct 11, 2011 at 12:59 AM, Sergio Aguirre <span dir="ltr"><<a href="mailto:sergio.aguirre@gmail.com" target="_blank">sergio.aguirre@gmail.com</a>></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 experiencing some unconventional results when doing volume rendering. </div><div><br></div><div>I need to adjust the pixel spacing of my image using vtkImageChangeInformation to show real physical dimensions. When I apply that filter only some parts of the volume rendered image are visible others simply do not appear. </div>
</blockquote><div><br></div></div>Sergio:<div><br></div><div>As a rule of thumb the sample distance should be half the minimum spacing of the dataset. It is likely that this has nothing to do with the change information filter. You may have setup an inappropriate transfer function. Did you try to use the vtkFixedPointVolumeRayCastMapper first ? What GPU do you have ? I'd recommend using VolView or 3DSlicer to load the dataset, use the UI to get a reasonable visualization and then translate the result (transfer function parameters) into code.</div>
<div><br></div><div>--</div><div>karthik</div><div><br></div><div><br></div><div>Did you load the dataset in VolView or 3D slicer and see if the dataset </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div></div><div class="h5">
<div><br></div><div>I updated the vtkGPUVolumeRayCastMapper SetSampleDistance to the same spacing I use in vtkImageChangeInformation with no change in the output. </div><div><br></div><div>Can anyone suggest what I am missing? </div>
<div><br>Sergio </div><div><br></div><div>//// code </div><div><br></div><div><div><span style="white-space:pre-wrap">        </span>double opacityWindow = 2000.0;</div><div><span style="white-space:pre-wrap">        </span>double opacityLevel = 1.0;</div>
<div><br></div><div><span style="white-space:pre-wrap">        </span>vtkDICOMImageReader *dicomReader = vtkDICOMImageReader::New();</div><div><span style="white-space:pre-wrap">        </span>dicomReader->SetDirectoryName("C:/Users/echopixel-01/Desktop/images/t120");</div>
<div><span style="white-space:pre-wrap">        </span>dicomReader->Update();</div></div><div><br></div><div><div><span style="white-space:pre-wrap">        </span>vtkImageData *dcmImage = vtkImageData::New(); </div>
<div><span style="white-space:pre-wrap">        </span>dcmImage = dicomReader->GetOutput(); </div><div><span style="white-space:pre-wrap">        </span>dcmImage->Update(); </div></div><div><br>
</div><div><div><span style="white-space:pre-wrap">        </span>vtkImageChangeInformation *iChange = vtkImageChangeInformation::New(); </div><div><span style="white-space:pre-wrap">        </span>iChange->SetInput(dcmImage); </div>
<div><span style="white-space:pre-wrap">        </span>iChange->SetOutputSpacing(0.000125, 0.000125, 0.0002); </div><div><span style="white-space:pre-wrap">        </span>iChange->Update(); </div>
</div><div><br></div><div><div><span style="white-space:pre-wrap">        </span>vtkColorTransferFunction *colorFun = vtkColorTransferFunction::New();</div><div><span style="white-space:pre-wrap">        </span>colorFun->AddRGBSegment(opacityLevel - 0.5*opacityWindow, 0.0, 0.0, 0.0, opacityLevel + 0.5*opacityWindow, 1.0, 1.0, 1.0 );</div>
<div><br></div><div><span style="white-space:pre-wrap">        </span>vtkPiecewiseFunction *opacityFun = vtkPiecewiseFunction::New();</div><div><span style="white-space:pre-wrap">        </span>opacityFun->AddSegment( opacityLevel - 0.5*opacityWindow, 0.0, opacityLevel + 0.5*opacityWindow, 1.0 );</div>
</div><div><br></div><div><div><span style="white-space:pre-wrap">        </span>vtkVolumeProperty *property1 = vtkVolumeProperty::New();</div><div><span style="white-space:pre-wrap">        </span>property1->SetIndependentComponents(true);</div>
<div><span style="white-space:pre-wrap">        </span>property1->SetColor( colorFun );</div><div><span style="white-space:pre-wrap">        </span>property1->SetScalarOpacity( opacityFun );</div>
<div><span style="white-space:pre-wrap">        </span>property1->SetInterpolationTypeToLinear();</div></div><div><br></div><div><div><span style="white-space:pre-wrap">        </span>vtkVolume *volume = vtkVolume::New();</div>
<div><span style="white-space:pre-wrap">        </span>vtkGPUVolumeRayCastMapper *mapper = vtkGPUVolumeRayCastMapper::New();</div></div><div><br></div><div> mapper->SetInputConnection(iChange->GetOutputPort());</div>
<div><span style="white-space:pre-wrap">        </span>mapper->SetBlendModeToComposite();</div><div><div><span style="white-space:pre-wrap">        </span>mapper->AutoAdjustSampleDistancesOff(); </div>
<div><span style="white-space:pre-wrap">        </span>mapper->SetSampleDistance(0.000125); </div></div><div><br></div><div><div><span style="white-space:pre-wrap">        </span>volume->SetProperty( property1 );</div>
<div><span style="white-space:pre-wrap">        </span>volume->SetMapper( mapper );</div><div><span style="white-space:pre-wrap">        </span>volume->SetPosition(0.0, 0.0, 0.0); </div><div><span style="white-space:pre-wrap">        </span>volume->SetOrigin(0.0, 0.0, 0.0); </div>
<div><span style="white-space:pre-wrap">        </span>volume->Update(); </div></div>
<br></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>