2 # ---------------------------------------------------------------------
4 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
6 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
7 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
8 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
10 # This software is governed by the CeCILL-B license under French law and
11 # abiding by the rules of distribution of free software. You can use,
12 # modify and/ or redistribute the software under the terms of the CeCILL-B
13 # license as circulated by CEA, CNRS and INRIA at the following URL
14 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
15 # or in the file LICENSE.txt.
17 # As a counterpart to the access to the source code and rights to copy,
18 # modify and redistribute granted by the license, users are provided only
19 # with a limited warranty and the software's author, the holder of the
20 # economic rights, and the successive licensors have only limited
23 # The fact that you are presently reading this means that you have had
24 # knowledge of the CeCILL-B license and that you accept its terms.
25 # ------------------------------------------------------------------------ */
28 #ifndef __bbvtkSphereList_h_INCLUDED__
29 #define __bbvtkSphereList_h_INCLUDED__
30 #include "bbvtk_EXPORT.h"
31 #include "bbtkAtomicBlackBox.h"
34 #include <vtkPolyDataMapper.h>
35 #include <vtkRenderer.h>
36 #include <vtkSphereSource.h>
37 #include <vtkLinearTransform.h>
43 class bbvtk_EXPORT SphereList
45 public bbtk::AtomicBlackBox
47 BBTK_BLACK_BOX_INTERFACE(SphereList,bbtk::AtomicBlackBox);
49 BBTK_DECLARE_INPUT(Renderer ,vtkRenderer*);
50 BBTK_DECLARE_INPUT(lstPointX,std::vector<double>);
51 BBTK_DECLARE_INPUT(lstPointY,std::vector<double>);
52 BBTK_DECLARE_INPUT(lstPointZ,std::vector<double>);
53 BBTK_DECLARE_INPUT(lstRadio ,std::vector<double>);
54 BBTK_DECLARE_INPUT(Colour ,std::vector<double>);
55 BBTK_DECLARE_INPUT(Opacity ,double);
56 BBTK_DECLARE_INPUT(Spacing ,std::vector<double>);
57 BBTK_DECLARE_INPUT(Transform ,vtkLinearTransform*);
59 BBTK_DECLARE_OUTPUT(ActorList,std::vector<vtkActor*>);
61 BBTK_PROCESS(Process);
64 std::vector<vtkActor *> sphereActor;
65 std::vector<vtkPolyDataMapper *>vtkpolydatamaperLst;
66 std::vector<vtkSphereSource *> vtkspheresourceLst;
70 void GetPoint(int i, double &px,double &py,double &pz);
71 void GetColor(int i, double &cr,double &cg,double &cb);
74 BBTK_BEGIN_DESCRIBE_BLACK_BOX(SphereList,bbtk::AtomicBlackBox);
75 BBTK_NAME("SphereList");
76 BBTK_AUTHOR("InfoTeam CREATIS");
77 BBTK_DESCRIPTION("Builds a sphere list actor given four vectors (X, Y, Z, radius).");
79 BBTK_INPUT(SphereList,Renderer,"Renderer",vtkRenderer*,"");
80 BBTK_INPUT(SphereList,lstPointX,"List of X coordinates. Requirement: same size as vector Y and vector Z.",std::vector<double>,"");
81 BBTK_INPUT(SphereList,lstPointY,"List of Y coordinates. Requirement: same size as vector X and vector Z.",std::vector<double>,"");
82 BBTK_INPUT(SphereList,lstPointZ,"List of Z coordinates. Requirement: same size as vector X and vector Y.",std::vector<double>,"");
83 BBTK_INPUT(SphereList,lstRadio,"List of Radio values",std::vector<double>,"");
84 BBTK_INPUT(SphereList,Colour,"Colour RGB values for the spheres (default [1 0 0]) (3 first values of the vector for the first sphere, following values for the second sphere, etc.)",std::vector<double>,"");
85 BBTK_INPUT(SphereList,Opacity,"Opacity of the spheres (default 1)",double,"");
86 BBTK_INPUT(SphereList,Spacing,"(default [1 1 1]) Spacing vector [sx sy sz]",std::vector<double>,"");
87 BBTK_INPUT(SphereList,Transform,"vtkTransform",vtkLinearTransform*,"");
89 BBTK_OUTPUT(SphereList,ActorList,"List of the sphere actors",std::vector<vtkActor*>,"");
91 BBTK_END_DESCRIBE_BLACK_BOX(SphereList);
95 #endif // __bbvtkSphereList_h_INCLUDED__