From: Eduardo DAVILA Date: Wed, 30 Aug 2017 10:09:48 +0000 (+0200) Subject: #3107 BBTK Bug New Normal - branch vtk7itk4 compilation with vtk7 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=8230f283d05b42a0139611458a7604e6aa10ec6c;p=bbtk.git #3107 BBTK Bug New Normal - branch vtk7itk4 compilation with vtk7 --- diff --git a/packages/vtk/src/bbvtkAppendPolyData.xml b/packages/vtk/src/bbvtkAppendPolyData.xml index 5ff9389..9dde44c 100644 --- a/packages/vtk/src/bbvtkAppendPolyData.xml +++ b/packages/vtk/src/bbvtkAppendPolyData.xml @@ -29,11 +29,11 @@ bbGetVtkObject()->SetInput(bbGetInputIn4()); bbGetVtkObject()->SetInput(bbGetInputIn5()); #else - bbGetVtkObject()->SetInputData(bbGetInputIn1()); - bbGetVtkObject()->SetInputData(bbGetInputIn2()); - bbGetVtkObject()->SetInputData(bbGetInputIn3()); - bbGetVtkObject()->SetInputData(bbGetInputIn4()); - bbGetVtkObject()->SetInputData(bbGetInputIn5()); + bbGetVtkObject()->AddInputData(bbGetInputIn1()); + bbGetVtkObject()->AddInputData(bbGetInputIn2()); + bbGetVtkObject()->AddInputData(bbGetInputIn3()); + bbGetVtkObject()->AddInputData(bbGetInputIn4()); + bbGetVtkObject()->AddInputData(bbGetInputIn5()); #endif diff --git a/packages/vtk/src/bbvtkAutoCrop.cxx b/packages/vtk/src/bbvtkAutoCrop.cxx index 26d928e..703366e 100644 --- a/packages/vtk/src/bbvtkAutoCrop.cxx +++ b/packages/vtk/src/bbvtkAutoCrop.cxx @@ -57,7 +57,8 @@ void AutoCrop::Process() int i,j,k; int sizeX,sizeY,sizeZ; - if (bbGetInputIn()!=NULL){ + if (bbGetInputIn()!=NULL) + { int ext[6]; //EED 2017-01-01 Migration VTK7 @@ -71,35 +72,26 @@ void AutoCrop::Process() sizeX=ext[1]-ext[0]+1; sizeY=ext[3]-ext[2]+1; - sizeZ=ext[5]-ext[4]+1; - + sizeZ=ext[5]-ext[4]+1; sizeX=(sizeX/2)*2; sizeY=(sizeY/2)*2; -// if (_newImage==NULL) -// { - _newImage = vtkImageData::New(); - _newImage->Initialize(); - _newImage->SetSpacing( bbGetInputIn()->GetSpacing() ); - _newImage->SetDimensions( sizeX,sizeY,sizeZ ); + _newImage = vtkImageData::New(); + _newImage->Initialize(); + _newImage->SetSpacing( bbGetInputIn()->GetSpacing() ); + _newImage->SetDimensions( sizeX,sizeY,sizeZ ); //EED 2017-01-01 Migration VTK7 #if (VTK_MAJOR_VERSION <= 5) - _newImage->SetWholeExtent(0,sizeX-1,0,sizeY-1,0,sizeZ-1); - _newImage->SetNumberOfScalarComponents( bbGetInputIn()->GetNumberOfScalarComponents() ); - _newImage->SetScalarType( bbGetInputIn()->GetScalarType() ); - _newImage->AllocateScalars(); + _newImage->SetWholeExtent(0,sizeX-1,0,sizeY-1,0,sizeZ-1); + _newImage->SetNumberOfScalarComponents( bbGetInputIn()->GetNumberOfScalarComponents() ); + _newImage->SetScalarType( bbGetInputIn()->GetScalarType() ); + _newImage->AllocateScalars(); #endif #if (VTK_MAJOR_VERSION >= 6) - _newImage->SetExtent(0,sizeX-1,0,sizeY-1,0,sizeZ-1); - _newImage->AllocateScalars(bbGetInputIn()->GetScalarType(),1); + _newImage->SetExtent(0,sizeX-1,0,sizeY-1,0,sizeZ-1); + _newImage->AllocateScalars(bbGetInputIn()->GetScalarType(),1); #endif - - -// } - - - for (i=0; iSetScalarComponentFromDouble(i,j,k, 0, value ); } // for k } // for j - } // for i - - }// bbGetInputIn - + } // for i + }// bbGetInputIn bbSetOutputOut(_newImage); - } //===== // 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) diff --git a/packages/vtk/src/bbvtkAutoCrop.h b/packages/vtk/src/bbvtkAutoCrop.h index 1af72e3..12f80ef 100644 --- a/packages/vtk/src/bbvtkAutoCrop.h +++ b/packages/vtk/src/bbvtkAutoCrop.h @@ -62,10 +62,10 @@ class bbvtk_EXPORT AutoCrop BBTK_BEGIN_DESCRIBE_BLACK_BOX(AutoCrop,bbtk::AtomicBlackBox); BBTK_NAME("AutoCrop"); BBTK_AUTHOR("Info-Dev"); - BBTK_DESCRIPTION("Automatique cropping of the image"); + BBTK_DESCRIPTION("Automatique cropping of the image, (See also ImageBoundaries)"); BBTK_CATEGORY("Filter"); BBTK_INPUT(AutoCrop,In,"Input image",vtkImageData*,""); - BBTK_INPUT(AutoCrop,Type,"Type of cropping (default 0) 0=power of two dimensions",int,""); + BBTK_INPUT(AutoCrop,Type,"Type of cropping (default 0) 0=power of two dimensions X and Y",int,""); BBTK_OUTPUT(AutoCrop,Out,"Output image",vtkImageData*,""); BBTK_END_DESCRIBE_BLACK_BOX(AutoCrop); //===== diff --git a/packages/vtk/src/bbvtkConeSource.xml b/packages/vtk/src/bbvtkConeSource.xml index 84cc3d1..c789e17 100644 --- a/packages/vtk/src/bbvtkConeSource.xml +++ b/packages/vtk/src/bbvtkConeSource.xml @@ -11,31 +11,47 @@ vtkConeSource - - - - - - - - + + + + + + + + +
 bbGetVtkObject()->SetCenter(bbGetInputCenterX(), 
                            bbGetInputCenterY(), 
                            bbGetInputCenterZ());
-
 bbGetVtkObject()->SetDirection(bbGetInputDirectionX(), 
                                bbGetInputDirectionY(),
-                               bbGetInputDirectionZ());
-                    
+                               bbGetInputDirectionZ());                    
 bbGetVtkObject()->SetResolution(bbGetInputResolution());
 bbGetVtkObject()->SetRadius((double)bbGetInputRadius());
+bbGetVtkObject()->SetHeight((double)bbGetInputHeight());
 bbGetVtkObject()->Update();
 
+ +
+  bbSetInputRadius( 1 );
+  bbSetInputHeight( 1 );
+  bbSetInputResolution( 10 );
+  bbSetInputCenterX( 0 );
+  bbSetInputCenterY( 0 );
+  bbSetInputCenterZ( 0 );
+  bbSetInputDirectionX( 0 );
+  bbSetInputDirectionY( 0 );
+  bbSetInputDirectionZ( 1 );
+
+
+ + +