1. 程式人生 > >DCMTK讀取DICOM影象資料SamplesPerPixel = 3,PlanarConfiguration=1時,如何用VTK顯示?

DCMTK讀取DICOM影象資料SamplesPerPixel = 3,PlanarConfiguration=1時,如何用VTK顯示?

我用dcmtk讀取影象的DICOM影象畫素資料SamplesPerPixel = 3,PlanarConfiguration=1時,用vtk顯示,需要在哪裡設定這個PlanarConfiguration=1的引數?

vtkUnsignedCharArray *scalars = vtkUnsignedCharArray::New();

((vtkUnsignedCharArray*)(scalars))->SetArray((unsigned char*)m_pImageData->getPixelData() + offLen / sizeof(unsigned char), eachLen, 1);

scalars->SetNumberOfComponents(bits);