<div dir="ltr"><div><div><div>Hello world!<br><br></div>I'm working in a project where we used to display "atomistic data" as a combination of vtkUnstructuredGrid points + vtkGlyph. However, now I have to display bonds in between them and I realized that there is a class that already does this (and much faster), but I have some questions in order to use it appropiately, so please, I need your help.<br><br><br></div>1.- Custom colors for atoms<br></div>As I read in <a href="https://gitlab.kitware.com/vtk/vtk/commit/69bb2b15d94a7d20cc281501c4386271c39c3956">this github commit</a> there is a way to change vtkMoleculeMapper's color array and I was not able to do it, so please can you tell me how to achieve this :-). I tried several ways with no success. My idea is to specify specific rgb colors to atoms no matter their atomic number (in order to display zones of data)<br><div><div><div><div><div><br><br></div><div>2.- Cell picking (mixed polydata actors and molecule actors) <br>As I explained above, I was using vtkUnstructuredGrid points + vtkGlyphs and that also mixed with polydata in something like attached picture (molecule_box.png). The image consists in a vtkMolecule -> vtkMoleculeMapper -> vtkActor and vtkCubeSource -> vtkMapper -> vtkActor displayed together in the same vtkRenderer. The problem is that if a use something like:<br><br></div><div>vtkCellPicker* picker = vtkCellPicker::New();<br></div><div>if( picker->Pick( screen[0], screen[1], 0.0, m_renderer ) ) <br>{<br></div><div>// detect cube face<br></div><div>}<br><br></div><div>It crashes extracting mappers input as vtkPolyData (of vtkMolecule actors) so, do you have a clue of how to overcome it? Can I exclude actors in vtkCellPicker to not check for Molecule actors? Should I use other actor and/or picker?<br></div><div><br><br></div><div>3.- Dataset values in Atoms<br></div><div>Is there any way of add vtkPointData and/or vtkCellData to a vtkAtom in order to visualize gradients later with a vtkContourBand or something like that? My idea is to visualize experimental potential energy and kinetic energy.<br><br></div><div>Thanks in advance for your support.<br><br></div><div>P.D.: I have been developing a very simple port of my project as an opensource application, for detecting memory leaks and bad practices. The attached picture comes from there. it can be found under: <a href="https://github.com/zxnord/Qt4VTK7SimpleViewer">https://github.com/zxnord/Qt4VTK7SimpleViewer</a><br></div><div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div>Atte.<br>
Edson René Contreras Cárdenas<br>
Ingeniero Civil Electrónico<br></div><br></div></div></div></div></div>
</div></div></div></div></div></div>