<div>Hi James,</div>
<div> </div>
<div> Unfortunately, if I set the visibility to false, the points are not rendered at all. I made the test rendering only the points with visibility set to false and true and this will not help for the transparancy.</div>
<div> </div>
<div>To set the opacity, I used <font size="2">vtkImageBlend for the image. I also set the alpha factor for the points using the lookuptable but it did not help. I can still only render or the image, or the points and not both at the same time.</font></div>
<div><font size="2"></font> </div>
<div><font size="2"> If you have other suggestions, I would appreciate it! I still have the problem,</font></div>
<div><font size="2"></font> </div>
<div>Pascale</div>
<div> </div>
<div> </div>
<div> </div>
<div><span class="gmail_quote">On 8/28/08, <b class="gmail_sendername">James Dippner</b> <<a href="mailto:jdippner@informetric.com">jdippner@informetric.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">You might try setting the cell visibility on the points actor to false, you may also try setting the opacity for the same actor.<br>
<br><br><br>Pascale Beliveau wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div><span class="e" id="q_11c0a5a5eaf476a6_1">Hi vtkusers,<br> I want to try a simple task: show an image (jpg) and see points over it. I have done the following code but the image is shown darker than it should. When rendered alone, the image has the correct intensities. Here is what I did:<br>
- create polydata from points and cells<br>- create PolyDataMapper, Actor and Renderer for polydata<br>- create ImageMapper, Actor2D and Renderer for image (vtkImageData)<br>- create RenderWindow and add both renderer for polydata and for image<br>
Is there something I'm missing, or do I add both images incorectly to the RenderWindow? I'm a bit puzzled by this effect and did not find anything helpfull on the mailing list.<br> Thanks in advance for your help,<br>
Pascale<br> The following is the code I created:<br> // create set of points that will deform image<br>vtkPoints * Points = vtkPoints::New();<br>Points->SetNumberOfPoints(2);<br>Points->SetPoint(0,1,1,1);<br>Points->SetPoint(1,10,10,10);<br>
vtkCellArray * Cells = vtkCellArray::New();<br>Cells->InsertNextCell(2);<br>Cells->InsertCellPoint(0);<br>Cells->InsertCellPoint(1);<br><br>vtkPolyData * PolyData = vtkPolyData::New();<br>PolyData->SetPoints(Points);<br>
PolyData->SetVerts(Cells);<br><br>// create image viewer<br>vtkImageMapper * MapImage = vtkImageMapper::New();<br>MapImage->SetInput(Image);<br>vtkActor2D * ImActor = vtkActor2D::New();<br>ImActor->SetMapper(MapImage);<br>
vtkRenderer * ImRenderer = vtkRenderer::New();<br>ImRenderer->AddActor2D(ImActor);<br><br>vtkRenderWindowInteractor * Interactor = vtkRenderWindowInteractor::New();<br><br>// create viewer for points<br>vtkPolyDataMapper * Mapper = vtkPolyDataMapper::New();<br>
Mapper->SetInput(PolyData);<br>vtkActor * Actor = vtkActor::New();<br>Actor->SetMapper(Mapper);<br>vtkRenderer * Renderer = vtkRenderer::New();<br>Renderer->AddViewProp(Actor);<br> // add both to main render window<br>
vtkRenderWindow * RenderWindow = vtkRenderWindow::New();<br>RenderWindow->SetSize(400,600);<br>RenderWindow->SetInteractor(Interactor);<br>RenderWindow->AddRenderer(Renderer);<br>RenderWindow->AddRenderer(ImRenderer);<br>
RenderWindow->Render();<br>Interactor->Start();<br></span></div>------------------------------------------------------------------------<br><br>_______________________________________________<br>This is the private VTK discussion list.<br>
Please keep messages on-topic. Check the FAQ at: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br>
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br> <br></blockquote><br>-- <br></blockquote></div>
<br>