1 #include "bbmaracasvisuImageActor.h"
2 #include "bbcreaMaracasVisuPackage.h"
4 #include "vtkImageShiftScale.h"
6 namespace bbcreaMaracasVisu
9 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ImageActor)
10 BBTK_BLACK_BOX_IMPLEMENTATION(ImageActor,bbtk::AtomicBlackBox);
11 void ImageActor::Process()
15 vtkRenderer *render = bbGetInputRenderer();
16 vtkImageData *img = bbGetInputIn();
17 vtkLinearTransform* transform = bbGetInputTransform();
21 imageshiftscale->SetInput( img );
22 imageshiftscale->SetOutputScalarTypeToUnsignedChar();
23 imageactor->SetInput( imageshiftscale->GetOutput() );
25 imageactor->SetUserTransform( transform );
28 render->AddActor( imageactor );
30 bbSetOutputOut(imageactor);
35 if ((firsttime==true) && (bbGetInputRenderer()!=NULL ))
38 bbGetInputRenderer()->AddActor( imageactor );
41 bbSetOutputOut(imageactor);
44 void ImageActor::bbUserSetDefaultValues()
50 bbSetInputTransform(NULL);
51 bbSetInputRenderer(NULL);
56 //-----------------------------------------------------------------
57 void ImageActor::bbUserInitializeProcessing()
59 imageactor = vtkImageActor::New();
60 imageshiftscale = vtkImageShiftScale::New();
63 //-----------------------------------------------------------------
64 void ImageActor::bbUserFinalizeProcessing()
68 //-----------------------------------------------------------------
70 // EO namespace bbcreaMaracasVisu