//==following is perhaps wrong guessing==
According to my experiment, the latest version (>5.0) vtk supports 3 channel color transfer function in the class "vtkVolumeProperty". Question is that it seems like no matter how many components are input (I input a 4-component data, and I checked it's still 4-component data after read by the reader), the mapper(vtkVolumeMapper) will merge the 4 component as one. I checked the source code of vtkVolumeMapper.cxx. I think it's very likely it's done at
vtkImageData *Input = vtkImageData::SafeDownCast(genericInput);//it might lose the four channels here when it down casts to vtkImageData.
and the following
this->setInputConnection(0, input);//then it pass the merged data to the 0 port (first port).
It might be the reason that the 3-channeled color transfer function doesn't work.
沒有留言:
張貼留言