/*========================================================================= Program: Insight Segmentation & Registration Toolkit Module: $RCSfile: itkExtendedImageIOFactory.cxx,v $ Language: C++ Date: $Date: 2006/08/10 17:38:46 $ Version: $Revision: 1.1.1.1 $ Copyright (c) Insight Software Consortium. All rights reserved. See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #ifdef _MSC_VER #pragma warning ( disable : 4786 ) #endif #include "itkExtendedImageIOFactory.h" #include "itkInterfileImageIOFactory.h" #include "itkMutexLock.h" #include "itkMutexLockHolder.h" namespace itk { void ExtendedImageIOFactory::RegisterBuiltInFactories() { static bool firstTime = true; static SimpleMutexLock mutex; { // This helper class makes sure the Mutex is unlocked // in the event an exception is thrown. MutexLockHolder mutexHolder( mutex ); if( firstTime ) { ObjectFactoryBase::RegisterFactory( InterfileImageIOFactory::New() ); firstTime = false; } } } } // end namespace itk