VTK  9.0.1
vtkOpenSlideReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOpenSlideReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
28 #ifndef vtkOpenSlideReader_h
29 #define vtkOpenSlideReader_h
30 
31 #include "vtkDomainsMicroscopyModule.h" // For export macro
32 #include "vtkImageReader2.h"
33 
34 extern "C"
35 {
36 #include "openslide/openslide.h" // For openslide support
37 }
38 
39 class VTKDOMAINSMICROSCOPY_EXPORT vtkOpenSlideReader : public vtkImageReader2
40 {
41 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
49  int CanReadFile(const char* fname) override;
50 
56  const char* GetFileExtensions() override
57  {
58  return ".ndpi .svs"; // TODO: Get exaustive list of formats
59  }
60 
62 
65  const char* GetDescriptiveName() override { return "Openslide::WholeSlideImage"; }
66 
67 protected:
69  ~vtkOpenSlideReader() override;
71 
72  void ExecuteInformation() override;
74 
75 private:
76  openslide_t* openslide_handle;
77 
78  vtkOpenSlideReader(const vtkOpenSlideReader&) = delete;
79  void operator=(const vtkOpenSlideReader&) = delete;
80 };
81 #endif
general representation of visualization data
Definition: vtkDataObject.h:60
Superclass of binary file readers.
a simple class to control print indentation
Definition: vtkIndent.h:34
Store vtkAlgorithm input/output information.
read digital whole slide images supported by openslide library
static vtkOpenSlideReader * New()
~vtkOpenSlideReader() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ExecuteInformation() override
const char * GetDescriptiveName() override
Return a descriptive name for the file format that might be useful in a GUI.
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 ?