[vtkusers] what's wrong with my code
InfoSeekerr
ali.mahmoud.habib at gmail.com
Sun Oct 25 17:09:38 EDT 2009
I want to create a tetrahedral mesh upon 3D volume come from 2D slices, but
it give error any suggestion please:
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();
--
View this message in context: http://www.nabble.com/what%27s-wrong-with-my-code-tp26051836p26051836.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list