hey all,<br>i sent this problem several days ago, but i did not get a satisfactory answer. May by the information i provided is not sufficient, so i ask all again with more information.<br>I use vtkVolumeRayCastCompositeFunction to do volume rendering, use vtkPiecewiseFunction to do opacity transfer, and vtkColorTransferFunction to do color transfer.<br>
The code i use is as the same as in example of vtkVolumeRayCastCompositeFunction
in vtkhelp. when the program read Dicom type dataset, the result is perfect. However, when the program read bmp type dataset, there is a terrace effect in the model which can viewed in the attached images. <br>Besides, i make a test. I use Amira to read bmp dataset, and do volume rendering. The result is also perfect, does this test prove the dataset is right?<br>
Can anyone tell me why and give
a solution? i have spent several days exploring the solution. <br><br>thanks in advance!<br><br>The code about reading bmp images is as follows:<br>vtkBMPReader *BMP = vtkBMPReader::New();<br>BMP->SetFilePrefix("E:/Data/brain/TCVH_");<br>
BMP->SetFilePattern("%s%d.bmp");<br> BMP->Allow8BitBMPOn(); <br> BMP->SetDataByteOrderToLittleEndian();<br> //BMP->SetFileNameSliceOffset(5);<br> BMP->SetFileNameSliceOffset(1400);<br>
BMP->SetFileNameSliceSpacing(1);<br> BMP->SetNumberOfScalarComponents(3);<br> BMP->SetDataSpacing(0.167,0.167,0.15);<br> BMP->SetDataOrigin(0.0,0.0,0.0);<br> BMP->SetDataExtent(0,329,0,345,0,40);<br>
BMP->Update();<br><div class="gmail_quote"><br><img title="dafd.png" alt="dafd.png" src="cid:ii_128a47afad2982f7" width="347" height="216"><br></div>