VTK  9.7.1
vtkJPEGReader.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
20 #ifndef vtkJPEGReader_h
21 #define vtkJPEGReader_h
22 
23 #include "vtkIOImageModule.h" // For export macro
24 #include "vtkImageReader2.h"
25 
26 VTK_ABI_NAMESPACE_BEGIN
27 class VTKIOIMAGE_EXPORT vtkJPEGReader : public vtkImageReader2
28 {
29 public:
30  static vtkJPEGReader* New();
32  void PrintSelf(ostream& os, vtkIndent indent) override;
33 
35 
41  int CanReadFile(VTK_FILEPATH const char* fname) override;
42  int CanReadFile(vtkResourceStream* stream) override;
44 
50  const char* GetFileExtensions() override { return ".jpeg .jpg"; }
51 
55  const char* GetDescriptiveName() override { return "JPEG"; }
56 
57 protected:
58  vtkJPEGReader() = default;
59  ~vtkJPEGReader() override = default;
60 
61  template <class OT>
62  void InternalUpdate(vtkImageData* data, OT* outPtr);
63 
64  void ExecuteInformation() override;
65  void ExecuteDataWithInformation(vtkDataObject* out, vtkInformation* outInfo) override;
66 
67 private:
68  vtkJPEGReader(const vtkJPEGReader&) = delete;
69  void operator=(const vtkJPEGReader&) = delete;
70 
71  static bool CheckMagicBytes(vtkResourceStream* stream);
72 };
73 VTK_ABI_NAMESPACE_END
74 #endif
read JPEG files
Definition: vtkJPEGReader.h:27
Abstract class used for custom streams.
static vtkImageReader2 * New()
Store vtkAlgorithm input/output information.
void ExecuteDataWithInformation(vtkDataObject *data, vtkInformation *outInfo) override
This is a convenience method that is implemented in many subclasses instead of RequestData.
const char * GetDescriptiveName() override
Return a descriptive name for the file format that might be useful in a GUI.
Definition: vtkJPEGReader.h:55
a simple class to control print indentation
Definition: vtkIndent.h:28
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
virtual void ExecuteInformation()
const char * GetFileExtensions() override
Get the file extensions for this format.
Definition: vtkJPEGReader.h:50
Superclass of binary file readers.
#define VTK_FILEPATH
virtual int CanReadFile(const char *fname)
Return non zero if the reader can read the given file name.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
general representation of visualization data
Definition: vtkDataObject.h:55
Set of utilities for OpenTURNS<->VTK conversions.
Definition: vtkOTFilter.h:20