No subject
Wed Oct 7 22:37:18 EDT 2009
generate a tetrahedral mesh from DICOM data for the purpose of finite<br>
element analysis.<br>
<br>
VTK is not a mesh generation system. It's primary purpose is<br>
visualization. Some posts have suggested alternative systems for<br>
finite element mesh generation. Please review those e-mails.<br>
<br>
Please stop asking the same questions over and over using multiple<br>
email addresses.<br>
<br>
Bill<br>
<br>
On Sun, Oct 25, 2009 at 5:09 PM, InfoSeekerr<br>
<<a href=3D"mailto:ali.mahmoud.habib at gmail.com">ali.mahmoud.habib at gmail.=
com</a>> wrote:<br>
><br>
> I want to create a tetrahedral mesh upon 3D volume come from 2D slices=
, but<br>
> it give error any suggestion please:<br>
><br>
> My code:<br>
><br>
> vtk::vtkDICOMImageReader ^VDR =3D gcnew vtk::vtkDICOMImageReader();<br=
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0VDR->SetDirectoryNam=
e("H:\\work\\Master<br>
> Degree\\DataSet\\case2\\DICOM\\PA1\\ST1\\SE2");<br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0VDR->SetDataOrigin(0=
, 0, 0);<br>
><br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0vtk::vtkImageChangeInfo=
rmation ^VIC =3D gcnew<br>
> vtk::vtkImageChangeInformation();<br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0VIC->SetInput(VDR-&g=
t;GetOutput());<br>
><br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0vtkClipVolume ^v =3D gc=
new vtkClipVolume();<br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0v->SetInputConnectio=
n(VDR->GetOutputPort());<br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0v->SetValue(2.0);<br=
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0v->GenerateClippedOu=
tputOff();<br>
><br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0vtkDataSetMapper ^mappe=
r =3D gcnew vtkDataSetMapper();<br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mapper->SetInputConn=
ection(v->GetOutputPort());<br>
><br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0// actor coordinates ge=
ometry, properties, transformation<br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0vtkActor ^aSphere =3D g=
cnew vtkActor();<br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0aSphere->SetMapper(m=
apper);<br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0// aSphere.GetProperty(=
).SetRepresentationToWireframe();<br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0//aSphere.GetProperty()=
.SetColor(0,0,1); // sphere color blue<br>
><br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0// a renderer and rende=
r window<br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0vtkRenderer ^ren1 =3D g=
cnew vtkRenderer();<br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0vtkRenderWindow ^renWin=
=3D gcnew vtkRenderWindow();<br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0renWin->AddRenderer(=
ren1);<br>
><br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0// an interactor<br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0vtkRenderWindowInteract=
or ^iren =3D gcnew vtkRenderWindowInteractor();<br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0iren->SetRenderWindo=
w(renWin);<br>
><br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0// add the actor to the=
scene<br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ren1->AddActor(aSphe=
re);<br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0//ren1.SetBackground(1,=
1,1); // Background color white<br>
><br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0// render an image (lig=
hts and cameras are created automatically)<br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0renWin->Render();<br=
>
><br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0// begin mouse interact=
ion<br>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0iren->Start();<br>
> --<br>
> View this message in context: <a href=3D"http://www.nabble.com/what%27=
s-wrong-with-my-code-tp26051836p26051836.html" target=3D"_blank">http://www=
.nabble.com/what%27s-wrong-with-my-code-tp26051836p26051836.html</a><br>
> Sent from the VTK - Users mailing list archive at Nabble.com.<br>
><br>
> _______________________________________________<br>
> Powered by <a href=3D"http://www.kitware.com" target=3D"_blank">www.ki=
tware.com</a><br>
><br>
> Visit other Kitware open-source projects at <a href=3D"http://www.kitw=
are.com/opensource/opensource.html" target=3D"_blank">http://www.kitware.co=
m/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the VTK FAQ at: <a href=3D"htt=
p://www.vtk.org/Wiki/VTK_FAQ" target=3D"_blank">http://www.vtk.org/Wiki/VTK=
_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href=3D"http://www.vtk.org/mailman/listinfo/vtkusers" target=3D"_bl=
ank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
</blockquote></div><br></div></div>
--0016e6d784eead5acc0476c9480d--
More information about the vtkusers
mailing list