VTK  9.6.20260201
vtkOpenSlideReader.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
21#ifndef vtkOpenSlideReader_h
22#define vtkOpenSlideReader_h
23
24#include "vtkDomainsMicroscopyModule.h" // For export macro
25#include "vtkImageReader2.h"
26
27extern "C"
28{
29#include "openslide/openslide.h" // For openslide support
30}
31
32VTK_ABI_NAMESPACE_BEGIN
33class VTKDOMAINSMICROSCOPY_EXPORT vtkOpenSlideReader : public vtkImageReader2
34{
35public:
38 void PrintSelf(ostream& os, vtkIndent indent) override;
39
44 int CanReadFile(VTK_FILEPATH const char* fname) override;
45
51 const char* GetFileExtensions() override
52 {
53 return ".ndpi .svs"; // TODO: Get exhaustive list of formats
54 }
55
57
60 const char* GetDescriptiveName() override { return "Openslide::WholeSlideImage"; }
61
62protected:
63 vtkOpenSlideReader() = default;
66
67 void ExecuteInformation() override;
69
70private:
71 openslide_t* openslide_handle = nullptr;
72
74 void operator=(const vtkOpenSlideReader&) = delete;
75};
76VTK_ABI_NAMESPACE_END
77#endif
general representation of visualization data
virtual int CanReadFile(const char *fname)
Return non zero if the reader can read the given file name.
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.
vtkOpenSlideReader()=default
Return a descriptive name for the file format that might be useful in a GUI.
~vtkOpenSlideReader() override
Return a descriptive name for the file format that might be useful in a GUI.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ExecuteInformation() override
static vtkOpenSlideReader * New()
const char * GetFileExtensions() override
Get the file extensions for this format.
void ExecuteDataWithInformation(vtkDataObject *out, vtkInformation *outInfo) override
This is a convenience method that is implemented in many subclasses instead of RequestData.
int CanReadFile(const char *fname) override
Is the given file supported ?
const char * GetDescriptiveName() override
Return a descriptive name for the file format that might be useful in a GUI.
#define VTK_FILEPATH