]> Creatis software - creaMaracasVisu.git/commitdiff
#3469 ImageActor Interpolation
authorEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Mon, 28 Jun 2021 08:27:13 +0000 (10:27 +0200)
committerEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Mon, 28 Jun 2021 08:27:13 +0000 (10:27 +0200)
bbtk/bbs/boxes/SliceImage-3DVisu.bbg
bbtk/bbs/boxes/SliceImage-3DVisu.bbs
bbtk/src/bbcreaMaracasVisuSetPosition.cxx
bbtk/src/bbcreaMaracasVisuSetPosition.h
bbtk/src/bbcreaMaracasVisuSliceImage.cxx
bbtk/src/bbcreaMaracasVisuSliceImage.h
bbtk/src/bbmaracasvisuImageActor.cxx
bbtk/src/bbmaracasvisuImageActor.h

index 3bd56d1b2dc1d04dc6b596416cf376598dbbdc47..04e8eed01e2e80536b41d0b417b5e03549e70431 100644 (file)
@@ -15,7 +15,7 @@ COMPLEX_PORT
 BoxChangeImageSlice
 -180.302777:-317.574649:-900.000000
 FIN_COMPLEX_PORT
-COMPLEXINPUTS:9
+COMPLEXINPUTS:11
 COMPLEX_PORT
 Direction
 -431.136158:282.815347:-900.000000
@@ -50,9 +50,17 @@ BorderActive
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 Interpolation_mode
-43.962217:266.623739:-900.000000
+37.224821:284.244621:-900.000000
 FIN_COMPLEX_PORT
-BOXES:43
+COMPLEX_PORT
+TypeTransparence
+-493.056508:283.285820:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+transparenceBeforeAboveRange
+-552.809749:283.731184:-900.000000
+FIN_COMPLEX_PORT
+BOXES:45
 BOX
 creaMaracasVisu:SliceImage:Box00
 ISEXEC:FALSE
@@ -71,7 +79,7 @@ BOX
 vtk:Transform:Box17
 ISEXEC:FALSE
 -320.706867:-77.874112:-900.000000
--216.883834:-87.874112:-900.000000
+-285.131867:-87.874112:-900.000000
 FIN_BOX
 BOX
 std:ConcatStrings:Box18
@@ -93,21 +101,21 @@ BOX
 creaVtk:ScalarsToColors:Box22
 ISEXEC:FALSE
 -266.449667:-213.711970:-900.000000
--211.174992:-223.711970:-900.000000
+-224.924667:-223.711970:-900.000000
 PORT
-Type:"1"
+Type:"101"
 FIN_BOX
 BOX
 vtk:Transform:Box32
 ISEXEC:FALSE
 -321.807500:-96.018762:-900.000000
--217.103627:-106.018762:-900.000000
+-286.232500:-106.018762:-900.000000
 FIN_BOX
 BOX
 creaMaracasVisu:DrawAxisTree3D:Box26
 ISEXEC:FALSE
 -516.159924:-217.577049:-900.000000
--235.323332:-227.577049:-900.000000
+-467.839924:-227.577049:-900.000000
 PORT
 Colour:"0 0 0"
 PORT
@@ -125,13 +133,13 @@ BOX
 vtk:Transform:Box27
 ISEXEC:FALSE
 -316.662998:-136.217224:-900.000000
--216.004660:-146.217224:-900.000000
+-281.087998:-146.217224:-900.000000
 FIN_BOX
 BOX
 std:CreateArithmeticSuiteVector:Box33
 ISEXEC:FALSE
 -531.652610:-47.521093:-900.000000
--269.420233:-57.521093:-900.000000
+-477.677610:-57.521093:-900.000000
 PORT
 Delta:"0"
 PORT
@@ -141,7 +149,7 @@ BOX
 std:GetVectorDoubleElement:Box34
 ISEXEC:FALSE
 -528.461121:-23.430170:-900.000000
--268.760853:-33.430170:-900.000000
+-477.411121:-33.430170:-900.000000
 PORT
 I:"0"
 FIN_BOX
@@ -149,7 +157,7 @@ BOX
 std:MathOperationVector:Box35
 ISEXEC:FALSE
 -532.115714:-65.685386:-900.000000
--245.000026:-75.685386:-900.000000
+-484.590714:-75.685386:-900.000000
 PORT
 In1:"0 1 1 0 0 "
 PORT
@@ -159,7 +167,7 @@ BOX
 std:CreateArithmeticSuiteVector:Box36
 ISEXEC:FALSE
 -461.446157:-46.434918:-900.000000
--254.034698:-56.434918:-900.000000
+-407.471157:-56.434918:-900.000000
 PORT
 Delta:"0"
 PORT
@@ -169,7 +177,7 @@ BOX
 std:MathOperationVector:Box37
 ISEXEC:FALSE
 -462.838158:-67.517853:-900.000000
--229.614491:-77.517853:-900.000000
+-415.313158:-77.517853:-900.000000
 PORT
 In1:"0 0 1 1 0 "
 PORT
@@ -185,7 +193,7 @@ BOX
 std:ConcatStrings:Box40
 ISEXEC:FALSE
 -451.527135:125.243442:-900.000000
--230.276764:115.243442:-900.000000
+-411.802135:115.243442:-900.000000
 PORT
 In1:"0"
 FIN_BOX
@@ -193,7 +201,7 @@ BOX
 std:StringSelect:Box41
 ISEXEC:FALSE
 -369.319073:-76.024573:-900.000000
--209.173708:-86.024573:-900.000000
+-327.159073:-86.024573:-900.000000
 PORT
 In0:"0 1 0 0"
 PORT
@@ -205,7 +213,7 @@ BOX
 std:GetVectorDoubleElement:Box44
 ISEXEC:FALSE
 -459.560548:-23.370210:-900.000000
--253.595111:-33.370210:-900.000000
+-408.510548:-33.370210:-900.000000
 PORT
 I:"1"
 FIN_BOX
@@ -237,7 +245,7 @@ BOX
 vtk:Transform:Box52
 ISEXEC:FALSE
 -312.196510:-56.034435:-900.000000
--215.125487:-66.034435:-900.000000
+-276.621510:-66.034435:-900.000000
 FIN_BOX
 BOX
 std:StringSelect:Box55
@@ -255,7 +263,7 @@ BOX
 std:ConcatStrings:Box57
 ISEXEC:FALSE
 -364.668989:127.201835:-900.000000
--211.154742:117.201835:-900.000000
+-324.943989:117.201835:-900.000000
 PORT
 In2:"  "
 FIN_BOX
@@ -277,7 +285,7 @@ BOX
 std:ConcatStrings:Box62
 ISEXEC:FALSE
 -297.110093:125.771424:-900.000000
--196.428586:115.771424:-900.000000
+-257.385093:115.771424:-900.000000
 PORT
 In1:"1 1 0"
 FIN_BOX
@@ -307,7 +315,7 @@ BOX
 std:Add:Box67
 ISEXEC:FALSE
 -389.417275:153.273064:-900.000000
--241.289576:143.273064:-900.000000
+-358.967275:143.273064:-900.000000
 FIN_BOX
 BOX
 std:GetVectorDoubleElement:Box68
@@ -329,13 +337,13 @@ BOX
 std:Add:Box70
 ISEXEC:FALSE
 -345.592205:152.557386:-900.000000
--231.618668:142.557386:-900.000000
+-315.142205:142.557386:-900.000000
 FIN_BOX
 BOX
 std:MathOperation:Box72
 ISEXEC:FALSE
 -257.408453:-30.946538:-900.000000
--209.196852:-40.946538:-900.000000
+-216.358453:-40.946538:-900.000000
 PORT
 In1:"1"
 PORT
@@ -345,7 +353,7 @@ BOX
 std:MathOperation:Box73
 ISEXEC:FALSE
 -263.661305:-53.857110:-900.000000
--210.515612:-63.857110:-900.000000
+-222.611305:-63.857110:-900.000000
 PORT
 Type:"2"
 FIN_BOX
@@ -353,7 +361,7 @@ BOX
 std:StringSelect:Box74
 ISEXEC:FALSE
 -336.062237:53.397805:-900.000000
--201.920527:43.397805:-900.000000
+-293.902237:43.397805:-900.000000
 PORT
 In0:"2"
 PORT
@@ -365,13 +373,13 @@ BOX
 std:GetVectorDoubleElement:Box75
 ISEXEC:FALSE
 -261.893099:1.211259:-900.000000
--210.076025:-8.788741:-900.000000
+-210.843099:-8.788741:-900.000000
 FIN_BOX
 BOX
 vtk:Transform:Box79
 ISEXEC:FALSE
 -313.408336:-36.360191:-900.000000
--215.345280:-46.360191:-900.000000
+-277.833336:-46.360191:-900.000000
 PORT
 Scale:"1 1 1"
 FIN_BOX
@@ -387,7 +395,7 @@ BOX
 std:StringSelect:Box81
 ISEXEC:FALSE
 -474.548561:74.412243:-900.000000
--232.252011:64.412243:-900.000000
+-432.388561:64.412243:-900.000000
 PORT
 In0:"0"
 PORT
@@ -414,10 +422,22 @@ FIN_BOX
 BOX
 std:MagicBox:Box78
 ISEXEC:FALSE
-28.546863:157.851551:-900.000000
-64.621863:147.851551:-900.000000
+26.038479:172.632362:-900.000000
+62.113479:162.632362:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box84
+ISEXEC:FALSE
+-501.738590:206.404618:-900.000000
+-465.663590:196.404618:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box85
+ISEXEC:FALSE
+-570.159315:210.007455:-900.000000
+-534.084315:200.007455:-900.000000
 FIN_BOX
-CONNECTIONS:67
+CONNECTIONS:71
 CONNECTION
 Box22:LookupTable:Box04:LookupTable
 NumberOfControlPoints:0
@@ -617,6 +637,18 @@ CONNECTION
 Interpolation_mode:Interpolation_mode:Box78:In
 NumberOfControlPoints:0
 CONNECTION
-Box78:Out:Box00:InterpolationMode
+Box78:Out:Box04:InterpolationMode
+NumberOfControlPoints:0
+CONNECTION
+TypeTransparence:TypeTransparence:Box84:In
+NumberOfControlPoints:0
+CONNECTION
+Box84:Out:Box22:Type
+NumberOfControlPoints:0
+CONNECTION
+Box85:Out:Box22:BelowAboveRangeTransparence
+NumberOfControlPoints:0
+CONNECTION
+transparenceBeforeAboveRange:transparenceBeforeAboveRange:Box85:In
 NumberOfControlPoints:0
 APP_END
index 10a34a36efe8737d33a9b94e479a48696a891871..93d111247ef64952863ebb0122d58ed71ea41a3c 100644 (file)
@@ -31,7 +31,7 @@ new std:ConcatStrings Box18
 new vtk:ImageVtkProperties Box20
 
 new creaVtk:ScalarsToColors Box22
-  set Box22.Type "1"
+  set Box22.Type "101"
 
 new vtk:Transform Box32
 
@@ -156,6 +156,10 @@ new std:MagicBox Box83
 
 new std:MagicBox Box78
 
+new std:MagicBox Box84
+
+new std:MagicBox Box85
+
 
 connect Box22.LookupTable Box04.LookupTable
 connect Box32.Out Box04.Transform
@@ -213,7 +217,9 @@ connect Box20.Size Box82.In0
 connect Box82.Out Box34.In
 connect Box82.Out Box44.In
 connect Box83.Out Box26.Active
-connect Box78.Out Box00.InterpolationMode
+connect Box78.Out Box04.InterpolationMode
+connect Box84.Out Box22.Type
+connect Box85.Out Box22.BelowAboveRangeTransparence
 
 # Complex input ports
 input Direction Box40.In1 " "
@@ -225,6 +231,8 @@ input Render Box61.In " "
 input WindowColorLevel Box65.In1 " "
 input BorderActive Box83.In " "
 input Interpolation_mode Box78.In " "
+input TypeTransparence Box84.In " "
+input transparenceBeforeAboveRange Box85.In " "
 
 # Complex output ports
 output BoxChangeImageSlice Box04.BoxChange " "
index c83106922cc2a71e468d8e89af92aac48e4e09a7..64c93c60c8dfab33dd67631f16f53ec6b0c8e8fd 100644 (file)
@@ -33,24 +33,28 @@ void SetPosition::Process()
 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
 
 
-       if (bbGetInputwxVtkBaseView()!=NULL)
+       if (bbGetInputActive()==true)
        {
-               vtkMPRBaseData* vtkmprbasedata = (vtkMPRBaseData*) (bbGetInputwxVtkBaseView()->GetVtkBaseData());
-               if (bbGetInputPoint().size()==3)
+               if (bbGetInputwxVtkBaseView()!=NULL)
                {
-                       vtkmprbasedata->SetX( bbGetInputPoint()[0] );
-                       vtkmprbasedata->SetY( bbGetInputPoint()[1] );
-                       vtkmprbasedata->SetZ( bbGetInputPoint()[2] );
-                       vtkmprbasedata->SetFixAxis2D( bbGetInputFixAxis2D() );
-                       wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
-#if wxMAJOR_VERSION <= 2
-                       bbGetInputwxVtkBaseView()->GetWxVTKRenderWindowInteractor ()->GetParent()->ProcessEvent( newevent );
-#else
-                       bbGetInputwxVtkBaseView()->GetWxVTKRenderWindowInteractor ()->GetParent()->ProcessWindowEvent( newevent );
-#endif                         
-               } // if bbGetInputPosition
-       } // bbGetInputwxVtkBaseView
+                       vtkMPRBaseData* vtkmprbasedata = (vtkMPRBaseData*) (bbGetInputwxVtkBaseView()->GetVtkBaseData());
+                       if (bbGetInputPoint().size()==3)
+                       {
+                               vtkmprbasedata->SetX( bbGetInputPoint()[0] );
+                               vtkmprbasedata->SetY( bbGetInputPoint()[1] );
+                               vtkmprbasedata->SetZ( bbGetInputPoint()[2] );
+                               vtkmprbasedata->SetFixAxis2D( bbGetInputFixAxis2D() );
+                               wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+       //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+       #if wxMAJOR_VERSION <= 2
+                               bbGetInputwxVtkBaseView()->GetWxVTKRenderWindowInteractor ()->GetParent()->ProcessEvent( newevent );
+       #else
+                               bbGetInputwxVtkBaseView()->GetWxVTKRenderWindowInteractor ()->GetParent()->ProcessWindowEvent( newevent );
+       #endif                          
+                       } // if bbGetInputPosition
+               } // bbGetInputwxVtkBaseView    
+       } // Active
+       
 }
 //===== 
 // 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)
@@ -60,8 +64,9 @@ void SetPosition::bbUserSetDefaultValues()
 
 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
 //    Here we initialize the input 'In' to 0
-   bbSetInputwxVtkBaseView( NULL ) ;
-   bbSetInputFixAxis2D( false ) ;
+       bbSetInputActive(true);
+       bbSetInputwxVtkBaseView( NULL ) ;
+       bbSetInputFixAxis2D( false ) ;
 }
 //===== 
 // 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)
index b1692f097c578f4ab374b1b185ddb7d1cdc08ba0..2e632af04784b40847153f5853c0f6e224f5887a 100644 (file)
@@ -20,6 +20,7 @@ class bbcreaMaracasVisu_EXPORT SetPosition
 //===== 
 // 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)
 //===== 
+  BBTK_DECLARE_INPUT(Active,bool);
   BBTK_DECLARE_INPUT(Point,std::vector<int>);
   BBTK_DECLARE_INPUT(wxVtkBaseView,wxVtkBaseView*);
   BBTK_DECLARE_INPUT(FixAxis2D,bool);
@@ -36,9 +37,12 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(SetPosition,bbtk::AtomicBlackBox);
   BBTK_AUTHOR("Info-Dev");
   BBTK_DESCRIPTION("No Description.");
   BBTK_CATEGORY("empty");
+
+  BBTK_INPUT(SetPosition,Active,"(default true) true/false",bool,"");
   BBTK_INPUT(SetPosition,Point,"vector with point to be set [X Y Z]",std::vector<int>,"");
   BBTK_INPUT(SetPosition,wxVtkBaseView,"wxVtkBaseView",wxVtkBaseView*,"");
   BBTK_INPUT(SetPosition,FixAxis2D,"(default false) true/false",bool,"");
+  
 //  BBTK_OUTPUT(SetPosition,Out,"First output",double,"");
 BBTK_END_DESCRIBE_BLACK_BOX(SetPosition);
 //===== 
index 2ffd69822a4fa39f7fabed10ab3e6e10e8c66b2d..48f21fc501a196392888f4c40db08a8cf7d71754 100644 (file)
@@ -119,9 +119,9 @@ void SliceImage::Process()
          } 
          imageReslice->SetOutputDimensionality(2);
 
-               if ( bbGetInputInterpolationMode()==0) { printf("EED neighbor\n"); imageReslice->SetInterpolationModeToNearestNeighbor();       }
-               if ( bbGetInputInterpolationMode()==1) { printf("EED linear\n"); imageReslice->SetInterpolationModeToLinear();                  }
-               if ( bbGetInputInterpolationMode()==2) { printf("EED Cubic\n"); imageReslice->SetInterpolationModeToCubic();                    }
+               if ( bbGetInputInterpolationMode()==0) { imageReslice->SetInterpolationModeToNearestNeighbor(); }
+               if ( bbGetInputInterpolationMode()==1) { imageReslice->SetInterpolationModeToLinear();                  }
+               if ( bbGetInputInterpolationMode()==2) { imageReslice->SetInterpolationModeToCubic();                   }
                        
 //EED 2017-01-01 Migration VTK7
 #if VTK_MAJOR_VERSION <= 5
@@ -144,7 +144,7 @@ void SliceImage::Process()
                bbSetInputIn(NULL);
                bbSetInputZ(0);
                bbSetInputSlice(0);
-               bbSetInputInterpolationMode(2);  // Linear
+               bbSetInputInterpolationMode(0);  // Linear
                bbSetInputTypeOrientation(0);
                imageReslice=NULL;
                std::vector<double> lstCos;
index 9b5af65c50bd229c9af67c00d419c515595825ae..3d7a75322f1410dd74638f56544a6398d4f210a6 100644 (file)
@@ -64,7 +64,7 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(SliceImage,bbtk::AtomicBlackBox);
   BBTK_INPUT(SliceImage,In,"Input image",vtkImageData *,"");
   BBTK_INPUT(SliceImage,Slice,"Slice",double,"");
   BBTK_INPUT(SliceImage,Z,"Z (deprecated)",double,"");
-  BBTK_INPUT(SliceImage,InterpolationMode,"(default 1) 0=NearestNeighbor  1=Linear  2=Cubic",int,"");
+  BBTK_INPUT(SliceImage,InterpolationMode,"(default 0) 0=NearestNeighbor  1=Linear  2=Cubic",int,"");
   BBTK_INPUT(SliceImage,ResliceAxesDirectionCosines,"ResliceAxesDirectionCosines [v1x,v1y,v1z,v2x,v2y,v2z,v3x,v3y,v3z],  ",std::vector<double>,"");
   BBTK_INPUT(SliceImage,TypeOrientation,"Type orientation (default 0) 0=XY, 1=X-Z, -1=XZ, 2=Y-Z, -2=ZY, 3=Free (Set the input ResliceAxesDirectionCosines)",int,"");
 
index 7d6e5c8dec3950419f68904a6bb60e0b25086dce..8dd6e609521117740806491c8b5dec91eb50d21b 100644 (file)
@@ -41,7 +41,6 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ImageActor,bbtk::AtomicBlackBox);
 void ImageActor::Process()
 {
                //JCP 04/04/09
-               vtkRenderer *render                             = bbGetInputRenderer();
                vtkImageData *img                               = bbGetInputIn();
                vtkLinearTransform* transform   = bbGetInputTransform();
                                
@@ -57,69 +56,10 @@ void ImageActor::Process()
                                imageactor->SetInputData( img );        
 #endif
                        } else {
-/*
-                               vtkLookupTable *table = vtkLookupTable::New();
-                               table->SetRange(0, 1000); // image intensity range
-                               table->SetValueRange(0.0, 1.0); // from black to white
-                               table->SetSaturationRange(0.0, 0.0); // no color saturation
-                               table->SetRampToLinear();
-                               table->Build();
-  double rgba[4];
-  table->GetTableValue(0,rgba);
-  rgba[3]=0;
-  table->SetTableValue(0,rgba);
-*/
-
-
-/*
-       vtkLookupTable *table = vtkLookupTable::New();
-          table->SetTableRange (0, 2000);
-          table->SetHueRange (1, 0);
-          table->SetSaturationRange (1, 1);
-          table->SetValueRange (1, 1);
-          table->Build(); //effective built
-*/
-
-/*
-vtkColorTransferFunction *table = vtkColorTransferFunction::New();
-table->SetColorSpaceToHSV();
-    table->HSVWrapOff();
-    table->AddHSVSegment(0.0, 0.6, 1.0, 1.0,
-                       1.0, 0.0, 1.0, 1.0);
-    table->SetNanColor(1.0, 0.0, 1.0);
-*/
-
-/* 
-printf("EED ImageActor::Process  Warnning ***************************Not here this code *");
-vtkLookupTable *table = vtkLookupTable::New();
-  table->SetNumberOfTableValues(1000);
-  table->SetRange(0, 1000);
-  table->Build();
-  double rgba1[4];
-       double rgba2[4];
-       for (int iLookTable = 0; iLookTable<500; iLookTable++)
-                       {
-                               table->GetTableValue(      iLookTable, rgba1);
-                               table->GetTableValue(1000-1-iLookTable, rgba2);
-                               table->SetTableValue(1000-1-iLookTable , rgba1[0],rgba1[1],rgba1[2],rgba1[3]);
-                               table->SetTableValue(      iLookTable , rgba2[0],rgba2[1],rgba2[2],rgba2[3]);
-                       } // for iLookTable     
-  double rgba[4];
-  table->GetTableValue(0,rgba);
-  rgba[3]=0;
-  table->SetTableValue(0,rgba);
-*/
                                vtkImageMapToColors *color = vtkImageMapToColors::New();
                                color->SetLookupTable( bbGetInputLookupTable() );
-//                             color->SetLookupTable( table );
                                color->PassAlphaToOutputOn();
 
-//                             imageshiftscale->SetInput( img );
-//                             imageshiftscale->SetOutputScalarTypeToUnsignedChar();
-
-//                             color->SetInput( imageshiftscale->GetOutput() );
-
-
 //EED 2017-01-01 Migration VTK7
 #if VTK_MAJOR_VERSION <= 5
                                color->SetInput( img );
@@ -130,7 +70,10 @@ vtkLookupTable *table = vtkLookupTable::New();
                                color->Update();
                                imageactor->GetMapper()->SetInputData( color->GetOutput() );
 #endif
-                               imageactor->GetProperty()->SetInterpolationTypeToNearest();
+
+                               if ( bbGetInputInterpolationMode()==0) { imageactor->GetProperty()->SetInterpolationTypeToNearest();    }
+                               if ( bbGetInputInterpolationMode()==1) { imageactor->GetProperty()->SetInterpolationTypeToLinear();             }
+                               if ( bbGetInputInterpolationMode()==2) { imageactor->GetProperty()->SetInterpolationTypeToCubic();              }
                                imageactor->SetForceOpaque(true);
                        }
 
@@ -138,10 +81,6 @@ vtkLookupTable *table = vtkLookupTable::New();
                        {
                          imageactor->SetUserTransform( transform );    
                        } // transform
-                       if(render != NULL )
-                       {
-//                             render->AddActor( imageactor );
-                       } // render
                        bbSetOutputOut(imageactor);
                } // img
                                
@@ -160,11 +99,11 @@ void ImageActor::bbUserSetDefaultValues()
     firsttime  = true;
     imageactor         = NULL;
     bbSetInputIn(NULL);
-//    bbSetInputType(0);
     bbSetInputOpacity(1);
     bbSetInputTransform(NULL);
     bbSetInputRenderer(NULL);
     bbSetInputLookupTable(NULL);
+    bbSetInputInterpolationMode(0);
 }
 
        
index a37515a99ed070383b94f74e552d4388fcf49cc8..2bc2f78a02d126c18d08b2c57d8134689b4e649b 100644 (file)
@@ -52,7 +52,8 @@ class bbcreaMaracasVisu_EXPORT ImageActor
   BBTK_DECLARE_INPUT(Renderer,vtkRenderer*);
   BBTK_DECLARE_INPUT(Opacity,double);
   BBTK_DECLARE_INPUT(LookupTable,vtkScalarsToColors*);
-//  BBTK_DECLARE_INPUT(Type,int);
+  BBTK_DECLARE_INPUT(InterpolationMode,int);
+
   BBTK_DECLARE_OUTPUT(Out,vtkProp3D*);
   BBTK_PROCESS(Process);
   void Process();
@@ -67,10 +68,10 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(ImageActor,bbtk::AtomicBlackBox);
        BBTK_DESCRIPTION("put image in a 3D univers");
        BBTK_CATEGORY("");
        BBTK_INPUT(ImageActor,In,"Image input",vtkImageData*,"");
-//     BBTK_INPUT(ImageActor,Type,"0 (default) vtkImageShiftScale Unsigned Char, 1 ColorTable",int,"");
        BBTK_INPUT(ImageActor,Transform,"Transform",vtkLinearTransform*,"");
        BBTK_INPUT(ImageActor,Renderer,"Renderer",vtkRenderer*,"");
        BBTK_INPUT(ImageActor,Opacity,"Opacity [0-1]",double,"");
+       BBTK_INPUT(ImageActor,InterpolationMode,"(default 0) 0=NearestNeighbor  1=Linear  2=Cubic",int,"");
        BBTK_INPUT(ImageActor,LookupTable,"LookupTable [vtkScalarsToColors]",vtkScalarsToColors*,"");
        BBTK_OUTPUT(ImageActor,Out,"Output vtk actor",vtkProp3D*,"");
 BBTK_END_DESCRIBE_BLACK_BOX(ImageActor);