VTK
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 =========================================================================*/
31 #ifndef vtkOpenSlideReader_h
32 #define vtkOpenSlideReader_h
33 
34 #include "vtkDomainsMicroscopyModule.h" // For export macro
35 #include "vtkImageReader2.h"
36 
37 extern "C" {
38 #include "openslide/openslide.h" // For openslide support
39 }
40 
41 class VTKDOMAINSMICROSCOPY_EXPORT vtkOpenSlideReader : public vtkImageReader2
42 {
43 public:
46  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
47 
51  int CanReadFile(const char* fname);
52 
58  virtual const char* GetFileExtensions()
59  {
60  return ".ndpi .svs"; // TODO: Get exaustive list of formats
61  }
62 
64 
67  virtual const char* GetDescriptiveName()
68  {
69  return "Openslide::WholeSlideImage";
70  }
71 protected:
75 
76  virtual void ExecuteInformation();
78 private:
79  openslide_t *openslide_handle;
80 
81  vtkOpenSlideReader(const vtkOpenSlideReader&) VTK_DELETE_FUNCTION;
82  void operator=(const vtkOpenSlideReader&) VTK_DELETE_FUNCTION;
83 };
84 #endif
vtkOpenSlideReader::GetFileExtensions
virtual const char * GetFileExtensions()
Get the file extensions for this format.
Definition: vtkOpenSlideReader.h:58
vtkOpenSlideReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkOpenSlideReader::~vtkOpenSlideReader
~vtkOpenSlideReader()
vtkOpenSlideReader::ExecuteDataWithInformation
virtual void ExecuteDataWithInformation(vtkDataObject *out, vtkInformation *outInfo)
This is a convenience method that is implemented in many subclasses instead of RequestData.
vtkOpenSlideReader::GetDescriptiveName
virtual const char * GetDescriptiveName()
Return a descriptive name for the file format that might be useful in a GUI.
Definition: vtkOpenSlideReader.h:67
vtkOpenSlideReader
read digital whole slide images supported by openslide library
Definition: vtkOpenSlideReader.h:42
vtkOpenSlideReader::vtkOpenSlideReader
vtkOpenSlideReader()
Definition: vtkOpenSlideReader.h:72
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkImageReader2
Superclass of binary file readers.
Definition: vtkImageReader2.h:59
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkOpenSlideReader::ExecuteInformation
virtual void ExecuteInformation()
vtkOpenSlideReader::New
static vtkOpenSlideReader * New()
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
vtkOpenSlideReader::CanReadFile
int CanReadFile(const char *fname)
Is the given file supported ?
vtkImageReader2.h