]> Creatis software - clitk.git/blobdiff - vv/vvToolCreator.txx
Adapted manual rigid registration: less functions in vvImage, more on vvToolRigidRed...
[clitk.git] / vv / vvToolCreator.txx
index c6a9566f804575917e3c0ecf5e1694cb8c938526..47b526ce85a1af279fb82cb6298ec831815b6356 100644 (file)
@@ -15,6 +15,8 @@
   - BSD        See included LICENSE.txt file
   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
 ======================================================================-====*/
+
+//------------------------------------------------------------------------------
 template<class ToolType>
 void vvToolCreator<ToolType>::InsertToolInMenu(vvMainWindowBase * m) { 
   mMainWindow = m;
@@ -31,3 +33,12 @@ void vvToolCreator<ToolType>::InsertToolInMenu(vvMainWindowBase * m) {
   vvToolCreatorBase::InsertToolInMenu(mMainWindow); 
 }
 //------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+template<class ToolType>
+vvToolCreator<ToolType>* & vvToolCreator<ToolType>::GetInstance() { 
+  if(!mSingleton)
+    mSingleton = new vvToolCreator<ToolType>;
+  return mSingleton;
+}
+//------------------------------------------------------------------------------