VTK  9.6.20260201
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
128
129#ifndef vtkJPEGReader_h
130#define vtkJPEGReader_h
131
132#include "vtkIOImageModule.h" // For export macro
133#include "vtkImageReader2.h"
134
135VTK_ABI_NAMESPACE_BEGIN
136class VTKIOIMAGE_EXPORT vtkJPEGReader : public vtkImageReader2
137{
138public:
141 void PrintSelf(ostream& os, vtkIndent indent) override;
142
144
150 int CanReadFile(VTK_FILEPATH const char* fname) override;
151 int CanReadFile(vtkResourceStream* stream) override;
153
159 const char* GetFileExtensions() override { return ".jpeg .jpg"; }
160
164 const char* GetDescriptiveName() override { return "JPEG"; }
165
166protected:
167 vtkJPEGReader() = default;
168 ~vtkJPEGReader() override = default;
169
170 template <class OT>
171 void InternalUpdate(vtkImageData* data, OT* outPtr);
172
173 void ExecuteInformation() override;
175
176private:
177 vtkJPEGReader(const vtkJPEGReader&) = delete;
178 void operator=(const vtkJPEGReader&) = delete;
179
180 static bool CheckMagicBytes(vtkResourceStream* stream);
181};
182VTK_ABI_NAMESPACE_END
183#endif
general representation of visualization data
topologically and geometrically regular array of data
vtkImageReader2()
Return a descriptive name for the file format that might be useful in a GUI.
a simple class to control print indentation
Definition vtkIndent.h:108
Store vtkAlgorithm input/output information.
void ExecuteDataWithInformation(vtkDataObject *out, vtkInformation *outInfo) override
This is a convenience method that is implemented in many subclasses instead of RequestData.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
const char * GetFileExtensions() override
Get the file extensions for this format.
int CanReadFile(vtkResourceStream *stream) override
Return 3 if, after a quick check of file header, it looks like the provided file or stream can be rea...
vtkJPEGReader()=default
static vtkJPEGReader * New()
int CanReadFile(const char *fname) override
Return 3 if, after a quick check of file header, it looks like the provided file or stream can be rea...
~vtkJPEGReader() override=default
void InternalUpdate(vtkImageData *data, OT *outPtr)
void ExecuteInformation() override
const char * GetDescriptiveName() override
Return a descriptive name for the file format that might be useful in a GUI.
Abstract class used for custom streams.
Set of utilities for OpenTURNS<->VTK conversions.
Definition vtkOTFilter.h:21
#define VTK_FILEPATH