Program: bbtk
Module: $RCSfile: bbvtkImagePlanes.cxx,v $
Language: C++
- Date: $Date: 2008/05/09 10:39:46 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2008/06/25 08:21:31 $
+ Version: $Revision: 1.4 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
* \brief
*/
-
-
#ifdef _USE_VTK_
#include "bbvtkImagePlanes.h"
#include "bbvtkPackage.h"
}
-
-
namespace bbvtk
{
BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,ImagePlanes)
BBTK_BLACK_BOX_IMPLEMENTATION(ImagePlanes,bbtk::AtomicBlackBox);
-
-
-
-
void ImagePlanes::bbUserConstructor()
{
Init();
bbSetInputIn(0);
+ std::vector<double> vect;
+ vect.push_back(512);
+ vect.push_back(256);
+ bbSetInputWindowLevel (vect);
}
+
void ImagePlanes::bbUserCopyConstructor()
{
Init();
planeWidgetZ->Delete();
}
+//---------------------------------------------------------------------
void ImagePlanes::Process()
{
if (bbGetInputIn()!=0)
planeWidgetZ->SetPlaneOrientationToZAxes();
planeWidgetZ->SetSlicePosition((zMax+zMin)/2.);
- planeWidgetZ->SetWindowLevel(512,256);
+ // planeWidgetZ->SetWindowLevel(512,256);
+
+ planeWidgetZ->SetWindowLevel(bbGetInputWindowLevel()[0],bbGetInputWindowLevel()[1]);
}
}
}//namespace bbtk
Program: bbtk
Module: $RCSfile: bbvtkImagePlanes.h,v $
Language: C++
- Date: $Date: 2008/05/09 10:39:47 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2008/06/25 08:21:31 $
+ Version: $Revision: 1.5 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
namespace bbvtk
{
-
+ typedef std::vector<double> winLevel;
class /*BBTK_EXPORT*/ ImagePlanes : public bbtk::AtomicBlackBox
{
BBTK_BLACK_BOX_INTERFACE(ImagePlanes,bbtk::AtomicBlackBox);
// BBTK_DECLARE_INPUT(Contour,int);
BBTK_DECLARE_INPUT(In,vtkImageData *);
+ BBTK_DECLARE_INPUT(WindowLevel,winLevel);
BBTK_DECLARE_OUTPUT(PlaneX,vtkImagePlaneWidget*);
BBTK_DECLARE_OUTPUT(PlaneY,vtkImagePlaneWidget*);
BBTK_DECLARE_OUTPUT(PlaneZ,vtkImagePlaneWidget*);
BBTK_DESCRIPTION("Creates three 3D planes with the input image mapped onto with which the user can interact. The output vtkImagePlaneWidget objects are to be inserted into a 3D scene (e.g. a Viewer3D)");
BBTK_CATEGORY("3D object creator");
BBTK_INPUT(ImagePlanes,In,"Input Image",vtkImageData *,"");
+ BBTK_INPUT(ImagePlanes,WindowLevel,"Widdow Level",winLevel,"");
BBTK_OUTPUT(ImagePlanes,PlaneX,"The image plane in X direction",vtkImagePlaneWidget*,"");
BBTK_OUTPUT(ImagePlanes,PlaneY,"The image plane in Y direction",vtkImagePlaneWidget*,"");
BBTK_OUTPUT(ImagePlanes,PlaneZ,"The image plane in Z direction",vtkImagePlaneWidget*,"");