input BoxExecute refresh.In2 "Execute the box"
input Orientation viewer2D.Orientation "Slicing orientation : 0:yz / 1:xz / 2:xy"
input Slice slider.In "Initial slice"
+ input Interpolate viewer2D.Interpolate "Pixels Interpolation (true/false)"
input SliderSize slider.Max "Slider Size"
input SliderTitle slider.Title "Slider Title"
input SliderOrientation slider.Orientation "Slider Orientation (H/V)"
Program: bbtk
Module: $RCSfile: bbwxvtkViewer2D.cxx,v $
Language: C++
- Date: $Date: 2009/05/28 08:55:45 $
- Version: $Revision: 1.37 $
+ Date: $Date: 2009/09/17 11:17:18 $
+ Version: $Revision: 1.38 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include "vtkRenderer.h"
#include <vtkInteractorStyleImage.h>
#include <vtkCommand.h>
-
+#include <vtkImageActor.h>
namespace bbwxvtk
{
//--------------------------------------------------------------------------
~Viewer2DWidget();
void UpdateView();
vtkRenderer *GetRenderer();
-
+ vtkImageActor *GetImageActor();
private:
bool mFirstTime;
Viewer2D *mBox;
<< std::endl;
*/
}
-
+
// std::cout << "OW = "<< mBox->bbGetWindow() << std::endl;
// std::cout << "CW = "<< mBox->bbGetContainingWindow() << std::endl;
// std::cout << "Sh = "<< mBox->bbIsShown() << std::endl;
+
+ bool interp = mBox->bbGetInputInterpolate();
+ if ( interp )
+ imageViewer->GetImageActor()->InterpolateOn();
+ else
+ imageViewer->GetImageActor()->InterpolateOff();
+
int orientation = mBox->bbGetInputOrientation();
if (orientation<0 || orientation>2) {
void Viewer2D::bbUserSetDefaultValues()
{
bbSetInputIn(NULL);
+ bbSetInputInterpolate(true); // JP
bbSetInputSlice(0);
bbSetOutputWidget(0);
bbSetOutputRenderer(0);
Program: bbtk
Module: $RCSfile: bbwxvtkViewer2D.h,v $
Language: C++
- Date: $Date: 2009/05/15 14:58:08 $
- Version: $Revision: 1.17 $
+ Date: $Date: 2009/09/17 11:17:19 $
+ Version: $Revision: 1.18 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
BBTK_BLACK_BOX_INTERFACE(Viewer2D,bbtk::WxBlackBox);
BBTK_DECLARE_INPUT(Slice, int);
- BBTK_DECLARE_INPUT(Orientation, int);
+ BBTK_DECLARE_INPUT(Interpolate, bool); // JP
+ BBTK_DECLARE_INPUT(Orientation, int);
BBTK_DECLARE_INPUT(In, vtkImageData *);
BBTK_DECLARE_OUTPUT(Out, int);
BBTK_CATEGORY("viewer");
BBTK_INPUT(Viewer2D, Slice, "Initial Slice number", int, "");
BBTK_INPUT(Viewer2D, Orientation, "Slicing orientation : 0:yz / 1:xz / 2:xy", int, "");
+ BBTK_INPUT(Viewer2D, Interpolate, "Pixels interpolation: true/false ", bool, ""); // JP
BBTK_INPUT(Viewer2D, In, "Input Image", vtkImageData *, "");
BBTK_OUTPUT(Viewer2D,Out, "Current Slice number", int, "");
BBTK_OUTPUT(Viewer2D,Renderer, "vtk Renderer", vtkRenderer*, "");