[vtkusers] convert vtkimagetype to vtkpolydata or vtkunstructured
InfoSeekerr
ali.mahmoud.habib at gmail.com
Sun Oct 25 17:13:10 EDT 2009
I tried this code with vtkclipvolume
My code:
vtk::vtkDICOMImageReader ^VDR = gcnew vtk::vtkDICOMImageReader();
VDR->SetDirectoryName("H:\\work\\Master
Degree\\DataSet\\case2\\DICOM\\PA1\\ST1\\SE2");
VDR->SetDataOrigin(0, 0, 0);
vtk::vtkImageChangeInformation ^VIC = gcnew
vtk::vtkImageChangeInformation();
VIC->SetInput(VDR->GetOutput());
vtkClipVolume ^v = gcnew vtkClipVolume();
v->SetInputConnection(VDR->GetOutputPort());
v->SetValue(2.0);
v->GenerateClippedOutputOff();
vtkDataSetMapper ^mapper = gcnew vtkDataSetMapper();
mapper->SetInputConnection(v->GetOutputPort());
// actor coordinates geometry, properties, transformation
vtkActor ^aSphere = gcnew vtkActor();
aSphere->SetMapper(mapper);
// aSphere.GetProperty().SetRepresentationToWireframe();
//aSphere.GetProperty().SetColor(0,0,1); // sphere color blue
// a renderer and render window
vtkRenderer ^ren1 = gcnew vtkRenderer();
vtkRenderWindow ^renWin = gcnew vtkRenderWindow();
renWin->AddRenderer(ren1);
// an interactor
vtkRenderWindowInteractor ^iren = gcnew vtkRenderWindowInteractor();
iren->SetRenderWindow(renWin);
// add the actor to the scene
ren1->AddActor(aSphere);
//ren1.SetBackground(1,1,1); // Background color white
// render an image (lights and cameras are created automatically)
renWin->Render();
// begin mouse interaction
iren->Start();
InfoSeekerr wrote:
>
> I don't want to clip the volume , I read a dicome series using
> vtkdicomreader, then the output of the reader is vtkimage , so I put in
> volume to show it , I want to create amesh on this volume (all of it) ,
>
> example: creating 3D of skull, then apply tetrahedral mesh on it . is
> there away instead of clipping
>
>
> best regards
>
>
>
> Bryn Lloyd-2 wrote:
>>
>> 0)
>> Please read this email carefully.
>>
>> 1)
>> You were told NOT to write to the developers list. Don't do it!
>>
>> 2)
>> STOP writing to people's private email addresses! Especially, when they
>> have asked you.
>>
>> 3)
>> You did NOT pay anybody to answer your questions. Don't expect to always
>> get one.
>>
>> 4)
>> Your questions are often impossible to understand. Spend more time on
>> writing a question, so that it is easy to understand. You will get
>> better answers in return!
>>
>> 5)
>> Nearly all VTK filter have either tests or examples (or both), which
>> explain how the filter/class can be used. This is visible on the doxygen
>> documentation. For instance vtkClipDataSet has tests:
>> http://www.vtk.org/doc/nightly/html/classvtkClipDataSet.html
>>
>>
>>
>> About you question:
>>
>> you could try following pipeline:
>>
>> reader
>> -> marching cubes (e.g. vtkContourFilter) at a given iso-contour
>> -> delaunay
>> -> writer or do something
>>
>>
>> alternatively, skipping the delaunay part:
>>
>> reader
>> -> clip volume (vtkClipDataSet) at a given iso-contour
>> -> optional: clipping can produce prisms and other 3D cells. Convert
>> these to tetrahedra (vtkDataSetTriangleFilter).
>> -> writer or do something
>>
>>
>>
>>
>>
>>
>> Ali Habib wrote:
>>> Dear all,
>>>
>>> I want to convert the output of vtkDICOMImageReader to vtkpolydata or
>>> vtkunstructured grid , to be used with vtkdealunary3D
>>>
>>> using vtkthreshold give an exption wish can''t load 33..element
>>>
>>>
>>> any suggestion
>>>
>>> best regards
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>> --
>> -------------------------------------------------
>> Bryn Lloyd
>> Computer Vision Laboratory
>> ETH Zürich, Sternwartstrasse 7, ETF C110
>> CH - 8092 Zürich, Switzerland
>> Tel: +41 44 63 26668
>> Fax: +41 44 63 21199
>> -------------------------------------------------
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>
>
--
View this message in context: http://www.nabble.com/convert-vtkimagetype-to-vtkpolydata-or-vtkunstructured-tp25969808p26051861.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list