VTK  9.5.20251008
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
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
43 int CanReadFile(VTK_FILEPATH const char* fname) override;
44
50 const char* GetFileExtensions() override
51 {
52 return ".ndpi .svs"; // TODO: Get exhaustive list of formats
53 }
54
56
59 const char* GetDescriptiveName() override { return "Openslide::WholeSlideImage"; }
60
61protected:
62 vtkOpenSlideReader() = default;
65
66 void ExecuteInformation() override;
68
69private:
70 openslide_t* openslide_handle = nullptr;
71
73 void operator=(const vtkOpenSlideReader&) = delete;
74};
75VTK_ABI_NAMESPACE_END
76#endif
general representation of visualization data
Superclass of binary file readers.
a simple class to control print indentation
Definition vtkIndent.h:108
Store vtkAlgorithm input/output information.
read digital whole slide images supported by openslide library
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