VTK  9.2.6
vtkImageReader2Factory.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageReader2Factory.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
38 #ifndef vtkImageReader2Factory_h
39 #define vtkImageReader2Factory_h
40 
41 #include "vtkIOImageModule.h" // For export macro
42 #include "vtkObject.h"
43 
44 class vtkImageReader2;
46 class vtkImageReader2FactoryCleanup;
47 
48 class VTKIOIMAGE_EXPORT vtkImageReader2Factory : public vtkObject
49 {
50 public:
51  static vtkImageReader2Factory* New();
53  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
59  static void RegisterReader(vtkImageReader2* r);
60 
67  static vtkImageReader2* CreateImageReader2(const char* path);
68 
77  static vtkImageReader2* CreateImageReader2FromExtension(const char* extension);
78 
83  static void GetRegisteredReaders(vtkImageReader2Collection*);
84 
85  /*
86  * An utility method to check if a (dotted or not) file extension is present
87  * in a list a whitespace separated list of dotted file extensions
88  */
89  static bool CheckExtensionIsInExtensions(const char* extension, const char* extensions);
90 
91 protected:
92  vtkImageReader2Factory() = default;
93  ~vtkImageReader2Factory() override = default;
94 
95  static void InitializeReaders();
96 
97 private:
98  static vtkImageReader2Collection* AvailableReaders;
100  void operator=(const vtkImageReader2Factory&) = delete;
101 
102  friend class vtkImageReader2FactoryCleanup;
103 };
104 
105 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:62
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:39
Superclass of binary file readers.
#define VTK_NEWINSTANCE
Superclass of binary file readers.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
maintain a list of image readers