]> Creatis software - creaVtk.git/commitdiff
Clean code
authoreduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Fri, 6 Dec 2024 10:30:04 +0000 (11:30 +0100)
committereduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Fri, 6 Dec 2024 10:30:04 +0000 (11:30 +0100)
bbtk_creaVtk_PKG/.DS_Store
bbtk_creaVtk_PKG/src/bbcreaVtkPlaneSource.cxx
bbtk_creaVtk_PKG/src/bbcreaVtkPlaneSource.h

index 9e9655d8fd9a5157af96d9e6d516da62ad3f1647..8fd3482ce295b13412c4a47a718c628794e1ca1a 100644 (file)
Binary files a/bbtk_creaVtk_PKG/.DS_Store and b/bbtk_creaVtk_PKG/.DS_Store differ
index 2521476fd21062cf599e0b8eb27ed14a5ae15608..a7ed64b824b4e858f80d1a5861cd98dc54fd9a98 100644 (file)
@@ -32,12 +32,13 @@ void PlaneSource::Process()
 
        bool byNormal   = true;
        double size     = 350;
-
+// bbGetInputVolumeSize  ?????????
+    
        // xy
        if ((bbGetInputNormal()[0]==0) && (bbGetInputNormal()[1]==0) && (bbGetInputNormal()[2]==1)  ) 
        {
                byNormal=       false;
-               p1[0]   =       size;   
+               p1[0]   =       size;
                p1[1]   =       0;
                p1[2]   =       0;    
                p2[0]   =       0;
@@ -93,8 +94,7 @@ void PlaneSource::Process()
                        plane->SetNormal( bbGetInputNormal()[0], bbGetInputNormal()[1], bbGetInputNormal()[2] );
                        printf("EED PlaneSource. Missing mechanism to define the size of the plane\n");
                }
-    plane->SetCenter( c );
-
+        plane->SetCenter( c );
                plane->Update( );
     bbSetOutputPlane( (vtkDataSet*)plane );
     bbSetOutputPolyData( plane->GetOutput() );
@@ -105,36 +105,39 @@ void PlaneSource::Process()
 //===== 
 void PlaneSource::bbUserSetDefaultValues()
 {
-   std::vector<double> c;
-   std::vector<double> n;
+    std::vector<double> c;
        c.push_back(0);
        c.push_back(0);
        c.push_back(0);
-       n.push_back(1);
-       n.push_back(0);
-       n.push_back(0);
-   bbSetInputCenter(c);
-   bbSetInputNormal(n);
-   bbSetInputXResolution(100);
-   bbSetInputYResolution(100);
+    bbSetInputCenter( c );
+    std::vector<double> n;
+    n.push_back(1);
+    n.push_back(0);
+    n.push_back(0);
+    bbSetInputNormal( n );
+    std::vector<int> volSize;
+    volSize.push_back(350);
+    volSize.push_back(350);
+    volSize.push_back(350);
+    bbSetInputVolumeSize( volSize );
+    bbSetInputXResolution(100);
+    bbSetInputYResolution(100);
 }
-//===== 
+
+//=====
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
 //===== 
 void PlaneSource::bbUserInitializeProcessing()
 {
-
-  
 }
-//===== 
+
+//=====
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
 //===== 
 void PlaneSource::bbUserFinalizeProcessing()
 {
-
-  
-}
 }
-// EO namespace bbcreaVtk
+
+}// EO namespace bbcreaVtk
 
 
index 2646c9bacff8426f79c08f35ad5cc1ff82b8c0c3..0f54e0cf740e17d50e927642b5cf5cfe3599f8aa 100644 (file)
@@ -25,6 +25,7 @@ class bbcreaVtk_EXPORT PlaneSource
   BBTK_DECLARE_INPUT(Normal,std::vector<double>);
   BBTK_DECLARE_INPUT(XResolution,int);
   BBTK_DECLARE_INPUT(YResolution,int);
+  BBTK_DECLARE_INPUT(VolumeSize,std::vector<int>);
   BBTK_DECLARE_OUTPUT(Plane,vtkDataSet*);
   BBTK_DECLARE_OUTPUT(PolyData,vtkPolyData*);
   BBTK_PROCESS(Process);
@@ -39,10 +40,11 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(PlaneSource,bbtk::AtomicBlackBox);
        BBTK_AUTHOR("carlos torres");
        BBTK_DESCRIPTION("No Description.");
        BBTK_CATEGORY("empty");
-       BBTK_INPUT(PlaneSource,Center,"Center (default[0,0,0]) ",std::vector<double>,"");
-       BBTK_INPUT(PlaneSource,Normal,"Normal (default[1,0,0]) ",std::vector<double>,"");
-       BBTK_INPUT(PlaneSource,XResolution,"XResolution (default 100)",int,"");
-       BBTK_INPUT(PlaneSource,YResolution,"YResolution (default 100)",int,"");
+       BBTK_INPUT(PlaneSource,Center,"( default [0,0,0] ) Center  ",std::vector<double>,"");
+       BBTK_INPUT(PlaneSource,Normal,"( default [1,0,0] ) Normal  ",std::vector<double>,"");
+       BBTK_INPUT(PlaneSource,XResolution,"(default 100) XResolution ",int,"");
+    BBTK_INPUT(PlaneSource,YResolution,"(default 100) YResolution ",int,"");
+       BBTK_INPUT(PlaneSource,VolumeSize,"(default [350 350 350])  VolumeSize [sizeX sizeY sizeZ]  ",std::vector<int>,"");
        BBTK_OUTPUT(PlaneSource,Plane,"Plane",vtkDataSet*,"");
        BBTK_OUTPUT(PlaneSource,PolyData,"vtkPolyData",vtkPolyData*,"");
 BBTK_END_DESCRIBE_BLACK_BOX(PlaneSource);