From 2942218e39481160338e30ceb53df96c6423f005 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Thu, 14 Dec 2017 14:18:29 +0100 Subject: [PATCH] #3155 creaMaracasVisu Feature New Normal - ViewerPlane ComplexBox --- bbtk/bbs/boxes/ViewerByPlane.bbg | 50 +++++++++++++++++-- bbtk/bbs/boxes/ViewerByPlane.bbs | 6 +++ .../bbcreaMaracasVisuShowNPoints_Reset.cxx | 3 ++ .../bbmaracasvisuImageChangeInformation.cxx | 13 ++--- bbtk/src/bbmaracasvisuShowNPoints.cxx | 6 +-- 5 files changed, 65 insertions(+), 13 deletions(-) diff --git a/bbtk/bbs/boxes/ViewerByPlane.bbg b/bbtk/bbs/boxes/ViewerByPlane.bbg index f6418ee..5511b1d 100644 --- a/bbtk/bbs/boxes/ViewerByPlane.bbg +++ b/bbtk/bbs/boxes/ViewerByPlane.bbg @@ -10,7 +10,7 @@ AUTHOR:Author ?? COMPLEXBOX:TRUE COMPLEXBOXNAME:ViewerByPlane PACKAGENAME:creaMaracasVisu -COMPLEXOUTPUTS:6 +COMPLEXOUTPUTS:12 COMPLEX_PORT widget 268.900118:-337.558426:-900.000000 @@ -35,6 +35,30 @@ COMPLEX_PORT render4 240.655803:-336.838673:-900.000000 FIN_COMPLEX_PORT +COMPLEX_PORT +Image +179.904670:-338.577176:-900.000000 +FIN_COMPLEX_PORT +COMPLEX_PORT +point +189.952033:-338.198030:-900.000000 +FIN_COMPLEX_PORT +COMPLEX_PORT +boxchange +161.895245:-338.198030:-900.000000 +FIN_COMPLEX_PORT +COMPLEX_PORT +wxvtkbaseview2 +302.859434:-337.469661:-900.000000 +FIN_COMPLEX_PORT +COMPLEX_PORT +wxvtkbaseview3 +312.830164:-338.079868:-900.000000 +FIN_COMPLEX_PORT +COMPLEX_PORT +wxvtkbaseview4 +322.717792:-337.766525:-900.000000 +FIN_COMPLEX_PORT COMPLEXINPUTS:2 COMPLEX_PORT FileNale @@ -326,8 +350,8 @@ FIN_BOX BOX std:SetElementVectorVectorInt:Box42 ISEXEC:FALSE -348.677331:-330.043208:-900.000000 -419.852331:-340.043208:-900.000000 +363.744192:-321.568099:-900.000000 +434.919192:-331.568099:-900.000000 PORT Value:"0" FIN_BOX @@ -479,7 +503,7 @@ ISEXEC:FALSE 613.705537:-176.303122:-900.000000 659.280537:-186.303122:-900.000000 FIN_BOX -CONNECTIONS:106 +CONNECTIONS:112 CONNECTION Box02:Out:Box01:In NumberOfControlPoints:0 @@ -798,4 +822,22 @@ NumberOfControlPoints:0 CONNECTION Box01:Renderer4:render4:render4 NumberOfControlPoints:0 +CONNECTION +Box02:Out:Image:Image +NumberOfControlPoints:0 +CONNECTION +Box01:Point:point:point +NumberOfControlPoints:0 +CONNECTION +Box01:BoxChange:boxchange:boxchange +NumberOfControlPoints:0 +CONNECTION +Box01:wxVtkBaseView2:wxvtkbaseview2:wxvtkbaseview2 +NumberOfControlPoints:0 +CONNECTION +Box01:wxVtkBaseView3:wxvtkbaseview3:wxvtkbaseview3 +NumberOfControlPoints:0 +CONNECTION +Box01:wxVtkBaseView4:wxvtkbaseview4:wxvtkbaseview4 +NumberOfControlPoints:0 APP_END diff --git a/bbtk/bbs/boxes/ViewerByPlane.bbs b/bbtk/bbs/boxes/ViewerByPlane.bbs index b2bf14b..9e64860 100644 --- a/bbtk/bbs/boxes/ViewerByPlane.bbs +++ b/bbtk/bbs/boxes/ViewerByPlane.bbs @@ -293,6 +293,12 @@ output render1 Box01.Renderer1 " " output render2 Box01.Renderer2 " " output render3 Box01.Renderer3 " " output render4 Box01.Renderer4 " " +output Image Box02.Out " " +output point Box01.Point " " +output boxchange Box01.BoxChange " " +output wxvtkbaseview2 Box01.wxVtkBaseView2 " " +output wxvtkbaseview3 Box01.wxVtkBaseView3 " " +output wxvtkbaseview4 Box01.wxVtkBaseView4 " " endefine diff --git a/bbtk/src/bbcreaMaracasVisuShowNPoints_Reset.cxx b/bbtk/src/bbcreaMaracasVisuShowNPoints_Reset.cxx index 044b309..a4c96a9 100644 --- a/bbtk/src/bbcreaMaracasVisuShowNPoints_Reset.cxx +++ b/bbtk/src/bbcreaMaracasVisuShowNPoints_Reset.cxx @@ -29,9 +29,12 @@ void ShowNPoints_Reset::Process() // bbSetOutputOut( bbGetInputIn() ); // std::cout << "Output value = " <DeleteAllPoints(); bbGetInputWidgetShowNPoints()->GetModelShowNPoints()->SetFirstTime(true); +printf("EED ShowNPoints_Reset::Process End\n"); } //===== // 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/bbtk/src/bbmaracasvisuImageChangeInformation.cxx b/bbtk/src/bbmaracasvisuImageChangeInformation.cxx index 2c0e510..e0b3f1c 100644 --- a/bbtk/src/bbmaracasvisuImageChangeInformation.cxx +++ b/bbtk/src/bbmaracasvisuImageChangeInformation.cxx @@ -43,9 +43,9 @@ void ImageChangeInformation::Process() mchange = vtkImageChangeInformation::New(); img->GetExtent( ext ); double origin[3]; - origin[0]=0.0; - origin[1]=0.0; - origin[2]=0.0; + origin[0] = 0.0; + origin[1] = 0.0; + origin[2] = 0.0; img->SetOrigin(origin); mchange->SetInput( img ); //EED 2016 15 06 @@ -59,6 +59,7 @@ void ImageChangeInformation::Process() spc[2] = bbGetInputNewSpacing()[2]; mchange->SetOutputSpacing( spc[0] , spc[1] , spc [2] ); //spacing } + mchange->Modified(); //important mchange->Update(); //important bbSetOutputOut( mchange->GetOutput() ); } @@ -66,9 +67,9 @@ void ImageChangeInformation::Process() void ImageChangeInformation::bbUserSetDefaultValues() { - mchange = NULL; - bbSetOutputOut( NULL); - bbSetInputIn(NULL); + mchange = NULL; + bbSetOutputOut( NULL); + bbSetInputIn(NULL); } void ImageChangeInformation::bbUserInitializeProcessing() diff --git a/bbtk/src/bbmaracasvisuShowNPoints.cxx b/bbtk/src/bbmaracasvisuShowNPoints.cxx index 440f361..796b3c1 100644 --- a/bbtk/src/bbmaracasvisuShowNPoints.cxx +++ b/bbtk/src/bbmaracasvisuShowNPoints.cxx @@ -50,7 +50,6 @@ WidgetShowNPointsBox::~WidgetShowNPointsBox() //------------------------------------------------------------------------ void WidgetShowNPointsBox::UpdatePoints(wxCommandEvent &event) { -printf("EED WidgetShowNPointsBox::UpdatePoints start\n"); WidgetShowNPoints::UpdatePoints(event); //Difference in Radio for text placement // double radio=GetModelShowNPoints()->GetRadio(); @@ -62,8 +61,6 @@ printf("EED WidgetShowNPointsBox::UpdatePoints start\n"); mbbShowNPoints->bbSetInputRadio( GetRadio() ); // EED // RefreshPoints(); -printf("EED WidgetShowNPointsBox::UpdatePoints end\n"); - } @@ -100,6 +97,7 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ShowNPoints,bbtk::WxBlackBox); //----------------------------------------------------------------- void ShowNPoints::Process() { +printf("EED ShowNPoints::Process Start\n"); if (mwxwidget!=NULL) { mwxwidget->SetRenderer( bbGetInputRenderer() ); @@ -111,6 +109,7 @@ void ShowNPoints::Process() if ( mwxwidget->GetModelShowNPoints()->GetFirstTime()==true ) { +printf("EED ShowNPoints::Process firsttime\n"); mwxwidget->GetModelShowNPoints()->SetFirstTime(false); mwxwidget->SetInitLstPoints( bbGetInputInitLstPointsX() , bbGetInputInitLstPointsY() , bbGetInputInitLstPointsZ() , bbGetInputInitLstLabels() ); } @@ -121,6 +120,7 @@ void ShowNPoints::Process() bbSetOutputlstLabels( mwxwidget->GetModelShowNPoints()->GetLstLabels() ); bbSetOutputWidgetShowNPoints( (WidgetShowNPoints*)mwxwidget ); } // mwxwidget +printf("EED ShowNPoints::Process End\n"); } //----------------------------------------------------------------- -- 2.47.1