From: Pablo Garzon Date: Tue, 21 Mar 2023 16:55:15 +0000 (+0100) Subject: #3501 new box GlyphPolyDataNormals (Pablo) X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=2511a0bae4882c573db8d1ec4662060b29cd337a;p=creaVtk.git #3501 new box GlyphPolyDataNormals (Pablo) --- diff --git a/bbtk_creaVtk_PKG/bbs/appli/exampleGlyphPolyDataNormals.bbg b/bbtk_creaVtk_PKG/bbs/appli/exampleGlyphPolyDataNormals.bbg new file mode 100644 index 0000000..d3a2997 --- /dev/null +++ b/bbtk_creaVtk_PKG/bbs/appli/exampleGlyphPolyDataNormals.bbg @@ -0,0 +1,146 @@ +# ---------------------------------- +# - BBTKGEditor v 1.5 BBG BlackBox Diagram file +# - /home/garzon/Creatis/C23/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleGlyphPolyDataNormals.bbg +# ---------------------------------- + +APP_START +CATEGORY: +DESCRIPTION:Description ?? +AUTHOR:Author ?? +COMPLEXBOX:FALSE +COMPLEXINPUTS:0 +BOXES:11 +BOX +vtk:LoadHola:Box00 +ISEXEC:FALSE +-24.352248:41.011907:-900.000000 +-2.802248:38.511907:-900.000000 +FIN_BOX +BOX +creaMaracasVisu:ViewerNV:Box01 +ISEXEC:FALSE +-21.544857:11.479281:-900.000000 +17.055143:8.979281:-900.000000 +PORT +nTypeView:"6 1 2 0" +FIN_BOX +BOX +creaVtk:PolyDataNormals:Box03 +ISEXEC:FALSE +-46.988484:-14.791760:-900.000000 +-24.693484:-17.291760:-900.000000 +FIN_BOX +BOX +creaVtk:GlyphPolyDataNormals:Box04 +ISEXEC:FALSE +-41.821903:-34.729404:-900.000000 +-18.941903:-37.229404:-900.000000 +PORT +Active:"true" +FIN_BOX +BOX +wx:LayoutSplit:Box05 +ISEXEC:TRUE +62.159456:-53.404780:-900.000000 +84.919456:-55.904780:-900.000000 +PORT +Orientation:"H" +FIN_BOX +BOX +wx:Slider:Box06 +ISEXEC:FALSE +-10.324454:-13.934716:-900.000000 +19.475546:-16.434716:-900.000000 +PORT +In:"50" +PORT +Max:"100" +PORT +Min:"1" +PORT +ReactiveOnTrack:"true" +FIN_BOX +BOX +vtk:UpdateRender:Box07 +ISEXEC:FALSE +-0.301063:-45.987298:-900.000000 +21.723937:-48.487298:-900.000000 +PORT +Active:"true" +FIN_BOX +BOX +vtk:vtkImageDataPointerRelay:Box09 +ISEXEC:FALSE +-46.514158:30.482579:-900.000000 +-23.304158:27.982579:-900.000000 +FIN_BOX +BOX +vtk:MarchingCubes:Box10 +ISEXEC:FALSE +-54.341783:10.913516:-900.000000 +-32.166783:8.413516:-900.000000 +PORT +Value:"2000" +FIN_BOX +BOX +creaMaracasVisu:PolyDataToActor_Widget:Box11 +ISEXEC:FALSE +-74.663502:-10.913516:-900.000000 +-51.643502:-13.413516:-900.000000 +FIN_BOX +BOX +wx:LayoutLine:Box12 +ISEXEC:FALSE +13.698344:-34.095329:-900.000000 +47.018344:-36.595329:-900.000000 +FIN_BOX +CONNECTIONS:16 +CONNECTION +Box03:Out:Box04:In +NumberOfControlPoints:0 +CONNECTION +Box01:Renderer1:Box04:Renderer +NumberOfControlPoints:0 +CONNECTION +Box01:Widget:Box05:Widget2 +NumberOfControlPoints:0 +CONNECTION +Box06:Out:Box04:MaskRatio +NumberOfControlPoints:0 +CONNECTION +Box06:BoxChange:Box04:BoxExecute +NumberOfControlPoints:0 +CONNECTION +Box01:Renderer1:Box07:Renderer +NumberOfControlPoints:0 +CONNECTION +Box04:BoxChange:Box07:BoxExecute +NumberOfControlPoints:0 +CONNECTION +Box00:Out:Box09:In +NumberOfControlPoints:0 +CONNECTION +Box09:Out:Box10:In +NumberOfControlPoints:0 +CONNECTION +Box09:Out:Box01:In +NumberOfControlPoints:0 +CONNECTION +Box10:Out:Box03:In +NumberOfControlPoints:0 +CONNECTION +Box10:Out:Box11:polydata +NumberOfControlPoints:0 +CONNECTION +Box01:Renderer1:Box11:render +NumberOfControlPoints:0 +CONNECTION +Box12:Widget:Box05:Widget1 +NumberOfControlPoints:0 +CONNECTION +Box06:Widget:Box12:Widget1 +NumberOfControlPoints:0 +CONNECTION +Box11:widget:Box12:Widget2 +NumberOfControlPoints:0 +APP_END diff --git a/bbtk_creaVtk_PKG/bbs/appli/exampleGlyphPolyDataNormals.bbs b/bbtk_creaVtk_PKG/bbs/appli/exampleGlyphPolyDataNormals.bbs new file mode 100644 index 0000000..357566b --- /dev/null +++ b/bbtk_creaVtk_PKG/bbs/appli/exampleGlyphPolyDataNormals.bbs @@ -0,0 +1,87 @@ +# ---------------------------------- +# - BBTKGEditor v 1.5 BBS BlackBox Script +# - /home/garzon/Creatis/C23/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleGlyphPolyDataNormals.bbs +# ---------------------------------- + +# BBTK GEditor Script +# ---------------------- + +include std +include itkvtk +include vtk +include creaMaracasVisu +include creaVtk +include wx + +author "Author ??" +description "Description ??" +category "" + +new vtk:LoadHola Box00 + +new creaMaracasVisu:ViewerNV Box01 + set Box01.nTypeView "6 1 2 0" + +new creaVtk:PolyDataNormals Box03 + +new creaVtk:GlyphPolyDataNormals Box04 + set Box04.Active "true" + +new wx:LayoutSplit Box05 + set Box05.Orientation "H" + +new wx:Slider Box06 + set Box06.In "50" + set Box06.Max "100" + set Box06.Min "1" + set Box06.ReactiveOnTrack "true" + +new vtk:UpdateRender Box07 + set Box07.Active "true" + +new vtk:vtkImageDataPointerRelay Box09 + +new vtk:MarchingCubes Box10 + set Box10.Value "2000" + +new creaMaracasVisu:PolyDataToActor_Widget Box11 + +new wx:LayoutLine Box12 + + +connect Box03.Out Box04.In + +connect Box01.Renderer1 Box04.Renderer + +connect Box01.Widget Box05.Widget2 + +connect Box06.Out Box04.MaskRatio + +connect Box06.BoxChange Box04.BoxExecute + +connect Box01.Renderer1 Box07.Renderer + +connect Box04.BoxChange Box07.BoxExecute + +connect Box00.Out Box09.In + +connect Box09.Out Box10.In + +connect Box09.Out Box01.In + +connect Box10.Out Box03.In + +connect Box10.Out Box11.polydata + +connect Box01.Renderer1 Box11.render + +connect Box12.Widget Box05.Widget1 + +connect Box06.Widget Box12.Widget1 + +connect Box11.widget Box12.Widget2 + + + +# Complex input ports +exec Box05 diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkGlyphPolyDataNormals.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkGlyphPolyDataNormals.cxx index 1234236..f21b517 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkGlyphPolyDataNormals.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkGlyphPolyDataNormals.cxx @@ -102,14 +102,14 @@ void GlyphPolyDataNormals::bbUserSetDefaultValues() // Here we initialize the input 'In' to 0 bbSetInputIn(NULL); bbSetInputOpacity(1); - bbSetInputActive(false); + bbSetInputActive(true); bbSetInputMaskRatio(10); std::vector color; color.push_back(0.0); color.push_back(0.0); color.push_back(0.5); bbSetInputColor(color); - bbSetInputSize(10); + bbSetInputSize(5); bbSetInputGlyphType(1); bbSetInputRenderer(NULL); bbSetOutputOut(NULL); diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkGlyphPolyDataNormals.h b/bbtk_creaVtk_PKG/src/bbcreaVtkGlyphPolyDataNormals.h index bdeecfd..fd741f3 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkGlyphPolyDataNormals.h +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkGlyphPolyDataNormals.h @@ -59,10 +59,10 @@ BBTK_DESCRIPTION("No Description."); BBTK_CATEGORY("empty"); BBTK_INPUT(GlyphPolyDataNormals,In,"in PolyData, must set normals beforehand",vtkPolyData*,""); BBTK_INPUT(GlyphPolyDataNormals,Opacity,"Opacity",double,""); -BBTK_INPUT(GlyphPolyDataNormals,MaskRatio,"Mask Ratio: select every nth point",int,""); -BBTK_INPUT(GlyphPolyDataNormals,Size,"Size",double,""); -BBTK_INPUT(GlyphPolyDataNormals,Active,"Active",bool,""); -BBTK_INPUT(GlyphPolyDataNormals,GlyphType,"Glyph type 0: Line | 1: Arrow",int,""); +BBTK_INPUT(GlyphPolyDataNormals,MaskRatio,"Mask Ratio: select every nth point (Default 10)",int,""); +BBTK_INPUT(GlyphPolyDataNormals,Size,"Size (Default 5)",double,""); +BBTK_INPUT(GlyphPolyDataNormals,Active,"Active (Default true)",bool,""); +BBTK_INPUT(GlyphPolyDataNormals,GlyphType,"Glyph type 0: Line | 1: Arrow (Default 1)",int,""); BBTK_INPUT(GlyphPolyDataNormals,Color,"Color",std::vector,""); BBTK_INPUT(GlyphPolyDataNormals,Renderer,"Renderer",vtkRenderer*,""); BBTK_OUTPUT(GlyphPolyDataNormals,Out,"out vtkProp3D",vtkProp3D*,"");