//------------------------------------------------------------------------------
vvBinaryImageOverlayActor::~vvBinaryImageOverlayActor()
+{
+ mImageActorList.clear();
+}
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+void vvBinaryImageOverlayActor::RemoveActors()
{
for (unsigned int i = 0; i < mImageActorList.size(); i++) {
- mSlicer->GetRenderer()->RemoveActor(mImageActorList[i]);
+ if (mSlicer != 0) {
+ if (mSlicer != NULL) {
+ if (mSlicer->GetRenderer() != 0) {
+ if (mImageActorList[i] != 0) {
+ mSlicer->GetRenderer()->RemoveActor(mImageActorList[i]);
+ }
+ }
+ }
+ }
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
-void vvBinaryImageOverlayActor::SetImage(vvImage * image, double bg, bool modeBG)
+void vvBinaryImageOverlayActor::SetImage(vvImage::Pointer image, double bg, bool modeBG)
{
mImage = image;
if (modeBG) {
void SetSlicer(vvSlicer * slicer);
void SetColor(double r, double g, double b);
void SetOpacity(double d);
- void SetImage(vvImage * image, double bg, bool modeBG=true);
+ void SetImage(vvImage::Pointer image, double bg, bool modeBG=true);
void SetDepth(double d) { mDepth = d; }
void Initialize(bool IsVisible=true);
void UpdateColor();
int mTSlice;
int mPreviousTSlice;
int mPreviousSlice;
- vvImage * mImage;
+ vvImage::Pointer mImage;
std::vector<double> mColor;
double mAlpha;
double mBackgroundValue;