Hi to all,<div><br></div><div>I am an Italian student of Bioengineering and I have to complete a project for the last exam before my Master Degree.</div><div><br></div><div>I'm working in C++ to render a certain number of electrodes, each one composed by a certain number of contacts, in the right position into a volume rendered after having read it from a .nifti file, deriving from a MRI of the head of a patient suffering from epilepsy.</div>
<div><br></div><div>I have created two different classes, one for electrodes and and one for contacts...</div><div>every electrode is represented by an instance of the corresponding class and has, as class member, one vector<contact> (C++ object) containing instances of contact class, corresponding to the contacts forming the real electrode. Every contact contains a vtkSphereSource, used for rendering every contact like a sphere with desired radius and color, in the right position.</div>
<div><br></div><div>I have obtained the result expected by adding to the same renderer a vtkVolume representing the MRI and one vtkActor for every contact, after having modified the center of the vtkSphereSource to adapt it to the internal coordinates of the vtkVolume (contact_pos_mri = mri_origin + contact_pos*mri_spacing) : in this way, I have obtained the right position for the contacts system into the MRI.</div>
<div><br></div><div>Now,I would write a .vtk file for every electrode, or better, for the collection of vtkSphereSource that is contained into the electrode instance, so that these files can be opened by another visualization program,like 3Dslicer, and used for other elaboration and analysis.</div>
<div><br></div><div>Could anyone of you tell me how to do this? </div><div>I read documentation about vtkWriter, vtkImageWriter adn vtkPolydatawriter, but I don't think that these could be useful for my purposes, or better, i don't understand how to use them to reach my goal.</div>
<div><br></div><div>Thanks</div><div><br></div><div>Massimiliano</div>