[vtkusers] Set the contour value from DicomReader
Larcher Aurélie
aurelie.larcher at imag.fr
Fri Dec 19 08:15:29 EST 2008
Fabio,
You are right ! The type of values is unsigned short (DICOM CT scan) -1024 /
1024, so for extract the skin, the contour value is around -500.
Thanks for your help !
_____
De : Fabio Meneghini [mailto:fab.meneghini at gmail.com]
Envoyé : vendredi 19 décembre 2008 12:41
À : Larcher Aurélie
Objet : Re: [vtkusers] Set the contour value from DicomReader
..that's pretty weird
I tried the same pipeline you proposed, with vtkContourFilter, and a DICOM
dataset as source, and it worked.
Here's the code I used (in TCL)
vtkDICOMImageReader DIR
DIR SetDirectoryName "/home/fabio/Scrivania/DICOM/GIFE/ST1/SE9"
DIR Update
set patient [DIR GetPatientName]
puts stdout $patient
set range [eval [eval [eval [DIR GetOutput] GetPointData] GetScalars]
GetRange]
puts stdout $range
vtkContourFilter skinExtractor
skinExtractor SetInputConnection [DIR GetOutputPort]
skinExtractor SetValue 0 60
vtkPolyDataNormals skinNormals
skinNormals SetInputConnection [skinExtractor GetOutputPort]
skinNormals SetFeatureAngle 60.0
vtkStripper skinStripper
skinStripper SetInputConnection [skinNormals GetOutputPort]
vtkPolyDataMapper skinMapper
skinMapper SetInputConnection [skinStripper GetOutputPort]
skinMapper ScalarVisibilityOff
vtkActor skin
skin SetMapper skinMapper
[skin GetProperty] SetDiffuseColor .6 .49 .25
[skin GetProperty] SetSpecular .3
[skin GetProperty] SetSpecularPower 20
/////////////////
it may be that the value you set for contouring is not good...try to take a
look at the histogram of the images, or simply look at the value range, just
like my script does.
Good luck!
Fabio
2008/12/19 Larcher Aurélie <aurelie.larcher at imag.fr>
Hi all,
I try to set contour value to my Dicom Reader in order to generate skin
surface.
When I use filter like vtkMarchingContourFilter or vtkContourFilter with the
contour value 30, there is no result.
vtkDICOMImageReader *colonneReader = vtkDICOMImageReader::New();
colonneReader->SetDirectoryName("F:/Images/VDH/Dicom/");
colonneReader->Update() ;
vtkMarchingContourFilter *surfacePeau =
vtkMarchingContourFilter::New();
surfacePeau->SetInputConnection(colonneReader->GetOutputPort());
surfacePeau->SetValue(0,30);
Nevertheless, when I use vtkEdgePoints with the same contour value, I have
some result
vtkEdgePoints *surfacePeau = vtkEdgePoints::New();
surfacePeau->SetInputConnection(colonneReader->GetOutputPort());
surfacePeau->SetValue(30);
If I changed the contour value at 200, I obtain the same result with the 3
filters (with different appearance obviously).
Can you tell me what's the problem and how can I generate skin surface with
vtkMarchingContourFilter or vtkContourFilter.
Thanks,
Aurélie
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081219/b11dd7e4/attachment.htm>
More information about the vtkusers
mailing list