// bbSetOutputOut( bbGetInputIn() );
// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
- vtkWindowToImageFilter *wif = vtkWindowToImageFilter::New();
+ vtkWindowToImageFilter *wif = vtkWindowToImageFilter::New();
+ if (bbGetInputSize().size()==2)
+ {
+ bbGetInputvtkRenderer()->GetVTKWindow()->SetSize( bbGetInputSize()[0], bbGetInputSize()[1] );
+ }
wif->SetInput( bbGetInputvtkRenderer()->GetVTKWindow() );
wif->SetMagnification( bbGetInputScale()[0] );
// wif->SetScale( bbGetInputScale()[0], bbGetInputScale()[1] );
wif->SetInputBufferTypeToRGB();
wif->ReadFrontBufferOff();
wif->Update();
- vtkPNGWriter *writer = vtkPNGWriter::New();
- writer->SetFileName( bbGetInputFileName().c_str() );
- writer->SetInput(wif->GetOutput());
- writer->Write();
+ vtkPNGWriter *writer = vtkPNGWriter::New();
+ writer->SetFileName( bbGetInputFileName().c_str() );
+ writer->SetInput(wif->GetOutput());
+ writer->Write();
/*
vtkFFMPEGWriter *writer2 = vtkFFMPEGWriter::New();
// 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(FileName,std::string);
+ BBTK_DECLARE_INPUT(Size,std::vector<int>);
BBTK_DECLARE_INPUT(Scale,std::vector<int>);
BBTK_DECLARE_INPUT(vtkRenderer,vtkRenderer*);
// BBTK_DECLARE_OUTPUT(Out,double);
BBTK_AUTHOR("InfoDev");
BBTK_DESCRIPTION("No Description.");
BBTK_CATEGORY("empty");
+ BBTK_INPUT(ScreenShot,Size,"[sX,sY] size of the render window. Default [actual window sX, actual window sY]",std::vector<int>,"");
BBTK_INPUT(ScreenShot,Scale,"[scaleX,scaleY] default [1,1]",std::vector<int>,"");
BBTK_INPUT(ScreenShot,FileName,"File Name Default:ScreenShot-BBTK.png",std::string,"");
BBTK_INPUT(ScreenShot,vtkRenderer,"First input",vtkRenderer*,"");