# How can Make 3D & 2D Countor from DICOM(RTStrucure) file?

**URL:** https://discourse.vtk.org/t/how-can-make-3d-2d-countor-from-dicom-rtstrucure-file/11071
**Category:** Development
**Tags:** jobs, python, code, proposal, file-formats
**Created:** [March 28, 2023, 6:17am UTC](https://discourse.vtk.org/t/how-can-make-3d-2d-countor-from-dicom-rtstrucure-file/11071 "2023-03-28T06:17:20Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![A.M\_Shahpouri](https://discourse.vtk.org/user_avatar/discourse.vtk.org/a.m_shahpouri/32/6549_2.png) [@A.M\_Shahpouri](https://discourse.vtk.org/u/A.M_Shahpouri)
#### Post date: [March 28, 2023, 6:17am UTC](https://discourse.vtk.org/t/how-can-make-3d-2d-countor-from-dicom-rtstrucure-file/11071/1 "2023-03-28T06:17:20Z")

</div>

Hi

> > > I want to read DICOM which have RTstrucure Data (Data of organ countor) and show 3D of that and  
> > > show 2D view by resliceing (vtkImageResliceMapper).

I has tried this way =\>

1. read point data List of \> each slice of \> each countor / from tag of DICOM( RTstrucure)

2. make vtkImageData from pointdata list fo each countor

3. show 2D by (vtkImageData \> vtkThreshold :  
(filled poly data of countor by vtkThreshold but vtkThreshold take a lot of time 🙁 ) \> vtkCutter \> vtkActor \> render() )

4 )show 3D by (vtkImageData \> vtkImageGaussianSmooth \> vtkFlyingEdges3D \> vtkDataSetMapper \> vtkOpenGLActor \> render() )

> If this way is True How Can I speed up vtkThreshold or a way for filled poly data of countor  
> Else If this way is incorrect please help me do that in true way .

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [March 28, 2023, 5:28pm UTC](https://discourse.vtk.org/t/how-can-make-3d-2d-countor-from-dicom-rtstrucure-file/11071/2 "2023-03-28T17:28:35Z")

</div>

This and similar topics posted on this forum may help:

> [@Convert 3D contour point cloud to binary voxel map](https://discourse.vtk.org/t/convert-3d-contour-point-cloud-to-binary-voxel-map/4214):
>
> I am writing a small C++ program, which contains: a voxel grid (nX \* nY \* nZ) a voxel (i,j,k) to 3D point (x,y,z) conversion matrix an array of 3D points (x,y,z) defining a closed surface As I am new to VTK, I was looking for help to see what would be the most efficient / shortest way to compute a boolean 3D matrix that tells me which points of the 3D voxel grid are inside the contour, and which ones are not. I would prefer not to use external batch-processes, just C++ API libraries like VTK …
