[vtkusers] Volume Rendering Problem in ActiViz 6.2
Mark DeArman
mark at cascadeacoustic.com
Thu Sep 24 22:43:48 EDT 2015
Where is the object null? Right after the call vtkCleanPolyData
removepoints = new vtkCleanPolyData(); ??
Mark DeArman
Cascade Acoustic Research
http://www.cascadeacoustic.com
(253) 200-5353
----------------------------------------
From: "Matias Montroull" <matimontg at gmail.com>
Sent: Thursday, September 24, 2015 7:18 PM
To: "vtkusers at vtk.org" <vtkusers at vtk.org>
Subject: [vtkusers] Volume Rendering Problem in ActiViz 6.2
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/20150924/268b24d5/attachment.html>
More information about the vtkusers
mailing list