Program: bbtk
Module: $RCSfile: bbvtkImagePlanes.cxx,v $
Language: C++
- Date: $Date: 2009/02/27 11:20:26 $
- Version: $Revision: 1.20 $
+ Date: $Date: 2009/03/12 09:36:21 $
+ Version: $Revision: 1.21 $
=========================================================================*/
/* ---------------------------------------------------------------------
#include "bbstdRelay.h"
+#include "vtkObjectFactory.h"
namespace bbstd
{
public:
static VtkCallbackType *New()
- {
- return new VtkCallbackType;
- }
+ {
+ return new VtkCallbackType;
+ }
+ //vtkTypeRevisionMacro(VtkCallbackType,vtkCommand);
+
virtual void Execute(vtkObject *caller, unsigned long, void*)
{
mBlackBox->Process();
};
//================================================================
+ //vtkCxxRevisionMacro(ImagePlanes::VtkCallbackType, "$Revision: 1.21 $");
//================================================================
vect.push_back(0);
vect.push_back(0);
bbSetInputWindowLevel (vect);
+ mVtkCallback = 0;
}
void ImagePlanes::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
bbSetOutputImageX(0);
bbSetOutputImageY(0);
bbSetOutputImageZ(0);
+ mVtkCallback = 0;
}
void ImagePlanes::Init()
//---------------------------------------------------------------------
void ImagePlanes::bbUserDestructor()
{
-
if (bbGetOutputPlaneX())
{
bbGetOutputPlaneX()->SetInput(NULL);
- bbGetOutputPlaneX()->UnRegister(NULL);
+ bbGetOutputPlaneX()->RemoveObserver(mVtkCallback);
+ bbGetOutputPlaneX()->Delete();
}
if (bbGetOutputPlaneY())
{
bbGetOutputPlaneY()->SetInput(NULL);
- bbGetOutputPlaneY()->UnRegister(NULL);
+ bbGetOutputPlaneY()->RemoveObserver(mVtkCallback);
+ bbGetOutputPlaneY()->Delete();
}
if (bbGetOutputPlaneZ())
{
bbGetOutputPlaneZ()->SetInput(NULL);
- bbGetOutputPlaneZ()->UnRegister(NULL);
+ bbGetOutputPlaneZ()->RemoveObserver(mVtkCallback);
+ bbGetOutputPlaneZ()->Delete();
+ }
+ if (mVtkCallback)
+ {
+ mVtkCallback->Delete();
}
- mVtkCallback->Delete();
}
//---------------------------------------------------------------------