[vtkusers] Read a grayscale in a Volume

MAXIME GUININ maxime.guinin at etudiant.univ-reims.fr
Mon Jul 20 05:22:17 EDT 2009


Hello

I'm trying to read the grey value of each voxel in a volume but I  
d'ont see how.
I read a vtk file creating by ITK like this :

------------------------------

vtkStructuredPointsReader* vtkreader = vtkStructuredPointsReader::New();
vtkreader->SetFileName("myfile.vtk");
vtkreader->Update();
vtkreader->GetOutput()->ReleaseDataFlagOn();

vtkImageCast* vtkImageCast = vtkImageCast::New();
vtkImageCast->SetInput(vtkreader->GetOutput());
vtkImageCast->SetOutputScalarTypeToUnsignedChar();

vtkImageData * ImageDataTest = vtkImageData::New();
ImageDataTest = vtkImageCast->GetOutput();

vtkVolumeTextureMapper3D * volumeMapper = vtkVolumeTextureMapper3D::New();
volumeMapper->SetInput(ImageDataTest);
vtkVolume* volume = vtkVolume::New();
volume->SetMapper(volumeMapper);
aRenderer->AddActor(volume);

------------------------------

The volume is display on the screen but I can't find where are voxels  
values ...
Can you help me please?

In advance, thanks a lot.
Cordially,
Maxime

-- 
Maxime Guinin
Étudiant à l'IUT de Reims Châlons Charleville
Département Informatique - Semestre 4 - Parcours : Imagerie Numérique
Email: maxime.guinin at etudiant.univ-reims.fr
Portable: 06.60.07.92.78  Tél: 03.26.50.12.61




More information about the vtkusers mailing list