[vtkusers] vtkDICOMImageReader volume rendering problem
Dominik Szczerba
domi at vision.ee.ethz.ch
Tue Dec 27 04:21:19 EST 2005
SetDataTypeToUnsignedShort?
Sounds like you need to convert your data to the supported type (no idea
how DICOM stores data)
--dsz
Peter wrote:
> hi my friends,
>
> when i am trying to do some volume rendering using
> vtkDICOMImageReader, it shows some error likes this.
>
> ERROR: In C:\VTK4.4\Rendering\vtkVolumeRayCastMapper.cxx, line 325
> vtkOpenGLVolumeRayCastMapper (026A2BB0): Cannot volume render data of
> type short, only unsigned char or unsigned short.
>
>
> my code is roughly like:
>
> =======
>
> vtkDICOMImageReader reader
> reader SetDataByteOrderToLittleEndian;
> reader SetDirectoryName "C:\\dicom"
> [reader GetOutput] ReleaseDataFlagOn
> reader SetDataSpacing 0.938 0.938 1.3
> reader Update
>
> vtkPiecewiseFunction volOpacityTransferFunctiono
> ...
> ...
>
> vtkColorTransferFunction colorTransferFunction
> ....
> ....
>
> vtkVolumeProperty vol_prop
> vol_prop SetColor colorTransferFunction
> vol_prop SetScalarOpacity volOpacityTransferFunction
> vol_prop SetInterpolationTypeToLinear
> vol_prop ShadeOn
>
> vtkVolumeRayCastCompositeFunction comp_func
>
> vtkVolumeRayCastMapper volmap
> volmap SetInput [reader GetOutput]
> volmap SetVolumeRayCastFunction comp_func
>
> volmap SetSampleDistance 1.0
>
> vtkVolume vol
> vol SetProperty vol_prop
> vol SetMapper volmap
> ren1 AddVolume vol
>
> ===============
>
>
> can anyone out there help me out for how to use vtkDICOMImageReader to
> do some volume rendering. it seems fine when using vtkVolume16Reader.
>
>
> Thank you very much
>
> Yours
>
> Peter Pan
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
--
Dominik Szczerba, Dr.
Computer Vision Lab CH-8092 Zurich
http://www.vision.ee.ethz.ch/~domi
More information about the vtkusers
mailing list