From: srit Date: Fri, 15 Apr 2011 08:29:19 +0000 (+0000) Subject: Smart pointer for filter in vv tools X-Git-Tag: v1.2.0~38 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=5178b9c98f56e67d2b60ba85b9ff700d28d0051c;p=clitk.git Smart pointer for filter in vv tools --- diff --git a/tools/clitkBinarizeImageGenericFilter.h b/tools/clitkBinarizeImageGenericFilter.h index db8956c..fb5df78 100644 --- a/tools/clitkBinarizeImageGenericFilter.h +++ b/tools/clitkBinarizeImageGenericFilter.h @@ -32,10 +32,6 @@ namespace clitk { public: - - //-------------------------------------------------------------------- - BinarizeImageGenericFilter(); - //-------------------------------------------------------------------- typedef BinarizeImageGenericFilter Self; typedef itk::SmartPointer Pointer; @@ -57,6 +53,7 @@ namespace clitk void UpdateWithInputImageType(); protected: + BinarizeImageGenericFilter(); template void InitializeImageType(); args_info_type mArgsInfo; diff --git a/vv/vvToolMIP.cxx b/vv/vvToolMIP.cxx index cfa338f..f23bfd4 100644 --- a/vv/vvToolMIP.cxx +++ b/vv/vvToolMIP.cxx @@ -3,8 +3,8 @@ Program: vv Module: $RCSfile: vvToolMIP.cxx,v $ Language: C++ - Date: $Date: 2011/03/22 15:50:39 $ - Version: $Revision: 1.2 $ + Date: $Date: 2011/04/15 08:29:21 $ + Version: $Revision: 1.3 $ Author : Bharath Navalpakkam (Bharath.Navalpakkam@creatis.insa-lyon.fr) Copyright (C) 2010 @@ -61,7 +61,6 @@ vvToolMIP::vvToolMIP(vvMainWindowBase * parent, Qt::WindowFlags f) //------------------------------------------------------------------------------ vvToolMIP::~vvToolMIP() { - delete mFilter; } //------------------------------------------------------------------------------ void vvToolMIP::Initialize() @@ -83,7 +82,7 @@ void vvToolMIP::apply() cmdline_parser_clitkMIP_init(&args_info); args_info.dimension_arg=this->dimensionSpinBox->value(); args_info.dimension_given=true; - clitk::MIPGenericFilter* filter= dynamic_cast(mFilter); + clitk::MIPGenericFilter* filter= dynamic_cast(mFilter.GetPointer()); filter->SetArgsInfo(args_info); filter->SetInputVVImage(mCurrentImage); filter->Update(); diff --git a/vv/vvToolWidgetBase.h b/vv/vvToolWidgetBase.h index 2c3ddd9..096130e 100644 --- a/vv/vvToolWidgetBase.h +++ b/vv/vvToolWidgetBase.h @@ -60,7 +60,7 @@ protected: virtual void Initialization(); void InitializeInputs(); Ui::vvToolWidgetBase ui; - clitk::ImageToImageGenericFilterBase * mFilter; + clitk::ImageToImageGenericFilterBase::Pointer mFilter; vvMainWindowBase * mMainWindow; std::vector mSlicerManagersCompatible; vvSlicerManager * mCurrentSlicerManager;