<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV>Dear All: </DIV>
<DIV>This is the first time I sending messeage to the list. I want to put some seeds points on special position of 3D image( lest say slice 100), but finally I can see the cursor at mutiple slice from 1-100.</DIV>
<DIV> </DIV>
<DIV>I use QtVtkWidge and vtkImageView2 to display the image. When I move the slider in QT, I can go through the image slice by slice.</DIV>
<DIV> </DIV>
<DIV>Below is my code to put seed points. vtkCurosr2D is used for painting the curosr. vtkPolyData is used to store all the seed points, I then add the Actor of SeedsGlyph to vtkImageViewer2 render.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> SeedsCursor = vtkCursor2D::New(); <BR> //SeedsCursor = vtkImageCursor3D::New(); <BR> <BR> SeedsCursor->AllOff(); <BR> SeedsCursor->AxesOn(); <BR> SeedsCursor->PointOn(); <BR> pts=vtkPoints::New();<BR> // for(unsigned int i=0;i<200;i++)<BR> pts->InsertPoint( 0, 128*1.37, 128*1.37, 100 );<BR> <BR> VisibleSeedsPolyData=vtkPolyData::New();<BR> VisibleSeedsPolyData->SetPoints(pts);///// input later<BR> <BR> SeedsGlyph = vtkGlyph3D::New(); <BR> SeedsGlyph->SetVectorModeToVectorRotationOff(); <BR> SeedsGlyph->ScalingOn();
<BR> SeedsGlyph->SetScaleModeToDataScalingOff(); <BR> SeedsGlyph->SetScaleFactor( 10); <BR> SeedsGlyph->SetInput( VisibleSeedsPolyData ); <BR> SeedsGlyph->SetSource( SeedsCursor->GetOutput() ); </DIV>
<DIV> SeedsMapper = vtkPolyDataMapper::New(); <BR> SeedsMapper->SetInput( SeedsGlyph->GetOutput() ); </DIV>
<DIV> SeedsActor = vtkActor::New(); <BR> SeedsActor->SetMapper( SeedsMapper ); <BR> //image_view2->GetImageActor()->SetOpacity(1.0);</DIV>
<DIV> image_view2->GetRenderer()->AddActor(SeedsActor);</DIV>
<DIV> </DIV>
<DIV>Can somebody teach me what is wrong with my code.</DIV>
<DIV> </DIV>
<DIV>Thanks</DIV>
<DIV> </DIV>
<DIV>Baoyun<BR></DIV></div><br>
</body></html>