[vtkusers] Volume Rendering Problem in ActiViz 6.2

Matias Montroull matimontg at gmail.com
Fri Oct 9 10:42:51 EDT 2015


Ok, I will answer my own question as I was able to figure out.

I had to change this line of code:

removepoints.SetInputData(contornos.GetOutput());
To:
*removepoints.SetInputConnection(contornos.GetOutputPort());*

Regards,

Matias.

El jue., 24 de sept. de 2015 a la(s) 11:17 p. m., Matias Montroull <
matimontg at gmail.com> escribió:

> 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
>
-- 
Matias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151009/2f6505c3/attachment.html>


More information about the vtkusers mailing list