VTK: IO/Image/vtkImageReader2Factory.h Source File

| VTK 9.3.1

vtkImageReader2Factory.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
35 #ifndef vtkImageReader2Factory_h
36 #define vtkImageReader2Factory_h
37
38 #include "vtkIOImageModule.h" // For export macro
39 #include "vtkObject.h"
40
41 VTK_ABI_NAMESPACE_BEGIN
42 class vtkImageReader2;
43 class vtkImageReader2Collection;
44 class vtkImageReader2FactoryCleanup;
45
46 class VTKIOIMAGE_EXPORT vtkImageReader2Factory : public vtkObject
47 {
48 public:
49 static vtkImageReader2Factory* New();
50 vtkTypeMacro(vtkImageReader2Factory, vtkObject);
51 void PrintSelf(ostream& os, vtkIndent indent) override;
52
57 static void RegisterReader(vtkImageReader2* r);
58
64 VTK_NEWINSTANCE
65 static vtkImageReader2* CreateImageReader2(const char* path);
66
74 VTK_NEWINSTANCE
75 static vtkImageReader2* CreateImageReader2FromExtension(const char* extension);
76
81 static void GetRegisteredReaders(vtkImageReader2Collection*);
82
83 /*
84 * An utility method to check if a (dotted or not) file extension is present
85 * in a list a whitespace separated list of dotted file extensions
86 */
87 static bool CheckExtensionIsInExtensions(const char* extension, const char* extensions);
88
89 protected:
90 vtkImageReader2Factory() = default;
91 ~vtkImageReader2Factory() override = default;
92
93 static void InitializeReaders();
94
95 private:
96 static vtkImageReader2Collection* AvailableReaders;
97 vtkImageReader2Factory(const vtkImageReader2Factory&) = delete;
98 void operator=(const vtkImageReader2Factory&) = delete;
99
100 friend class vtkImageReader2FactoryCleanup;
101 };
102
103 VTK_ABI_NAMESPACE_END
104 #endif
vtkImageReader2Collection
maintain a list of image readers
Definition: vtkImageReader2Collection.h:23
vtkImageReader2Factory
Superclass of binary file readers.
Definition: vtkImageReader2Factory.h:47
vtkImageReader2Factory::CheckExtensionIsInExtensions
static bool CheckExtensionIsInExtensions(const char *extension, const char *extensions)
vtkImageReader2Factory::New
static vtkImageReader2Factory * New()
vtkImageReader2Factory::InitializeReaders
static void InitializeReaders()
vtkImageReader2Factory::GetRegisteredReaders
static void GetRegisteredReaders(vtkImageReader2Collection *)
The caller must allocate the vtkImageReader2Collection and pass in the pointer to this method.
vtkImageReader2Factory::vtkImageReader2Factory
vtkImageReader2Factory()=default
vtkImageReader2Factory::~vtkImageReader2Factory
~vtkImageReader2Factory() override=default
vtkImageReader2Factory::RegisterReader
static void RegisterReader(vtkImageReader2 *r)
registered readers will be queried in CreateImageReader2 to see if they can load a given file.
vtkImageReader2Factory::CreateImageReader2FromExtension
static vtkImageReader2 * CreateImageReader2FromExtension(const char *extension)
Create a vtkImageReader2 from a (dotted or not) file extension.
vtkImageReader2Factory::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageReader2Factory::CreateImageReader2
static vtkImageReader2 * CreateImageReader2(const char *path)
open the image file, it is the callers responsibility to call Delete on the returned object.
vtkImageReader2
Superclass of binary file readers.
Definition: vtkImageReader2.h:57
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:61
vtkObject.h
VTK_NEWINSTANCE
#define VTK_NEWINSTANCE
Definition: vtkWrappingHints.h:32