Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkPointSetWriterFactory.cpp
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
18 
19 #include "itkCreateObjectFunction.h"
20 #include "itkVersion.h"
21 
22 #include "mitkPointSetWriter.h"
23 
24 namespace mitk
25 {
26  template <class T>
27  class CreatePointSetWriter : public itk::CreateObjectFunctionBase
28  {
29  public:
31  typedef CreatePointSetWriter Self;
33 
35  itkFactorylessNewMacro(Self);
36  LightObject::Pointer CreateObject() override
37  {
38  typename T::Pointer p = T::New();
39  p->Register();
40  return p.GetPointer();
41  }
42 
43  protected:
44  CreatePointSetWriter() {}
45  ~CreatePointSetWriter() {}
46  private:
47  CreatePointSetWriter(const Self &); // purposely not implemented
48  void operator=(const Self &); // purposely not implemented
49  };
50 
52  {
53  this->RegisterOverride(
54  "IOWriter", "PointSetWriter", "Point-Set Writer", 1, mitk::CreatePointSetWriter<mitk::PointSetWriter>::New());
55  }
56 
58  const char *PointSetWriterFactory::GetITKSourceVersion() const { return ITK_SOURCE_VERSION; }
59  const char *PointSetWriterFactory::GetDescription() const { return "PointSetWriterFactory"; }
60 } // end namespace mitk
itk::SmartPointer< Self > Pointer
DataCollection - Class to facilitate loading/accessing structured data.
virtual const char * GetDescription(void) const override
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.