[vtkusers] Volume Rendering Problem in ActiViz 6.2
Matias Montroull
matimontg at gmail.com
Thu Sep 24 22:18:01 EDT 2015
Hi,
I was using ActiVIz 5.8 and this code below was working just fine:
Now, I've installed the 6.2 version and the vtkCleanPolyData object is null
for some reason..
Has anything changed in Volume reconstruction from a Dicom Series from
version to version?
Thanks,
vtkDICOMImageReader readerdicom = new vtkDICOMImageReader();
readerdicom.SetDirectoryName(path_directorio_imagenes_originales);
double origen_X = -pixelspacing_X * (img[0].Width) / 2;
double origen_Y = -pixelspacing_Y * (img[0].Height) / 2;
readerdicom.SetDataOrigin(origen_X, origen_Y, -Z_max);
readerdicom.Update();
//Filtro para dar vuelta la imagen
vtkImageReslice reslice = new vtkImageReslice();
reslice.SetResliceAxesDirectionCosines(-1, 0, 0, 0, 1, 0, 0, 0,
-1);
reslice.SetInputConnection(readerdicom.GetOutputPort());
reslice.Update();
//Filtro para extraer la piel (por ISOValue)
vtkMarchingCubes skinextractor = vtkMarchingCubes.New();
skinextractor.SetInputConnection(reslice.GetOutputPort());
skinextractor.SetValue(1, umbral);
//Filtro para quedarnos solamente con el contorno (visual)
vtkPolyDataConnectivityFilter contornos = new
vtkPolyDataConnectivityFilter();
contornos.SetInputConnection(skinextractor.GetOutputPort());
contornos.SetExtractionModeToLargestRegion();
contornos.SetColorRegions(1);
//Filtro para remover los puntos que no son del contorno y
guardarlos en la instancia POIs_3D
vtkCleanPolyData removepoints = new vtkCleanPolyData();
removepoints.SetInputData(contornos.GetOutput());
removepoints.Update();
vtkPoints puntos_contorno = new vtkPoints();
puntos_contorno = removepoints.GetOutput().GetPoints();
--
Matias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150925/e09dc17e/attachment.html>
More information about the vtkusers
mailing list