cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
svlFileHandlers.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3 
4 /*
5 
6  Author(s): Balazs Vagvolgyi
7  Created on: 2006
8 
9  (C) Copyright 2006-2007 Johns Hopkins University (JHU), All Rights
10  Reserved.
11 
12 --- begin cisst license - do not edit ---
13 
14 This software is provided "as is" under an open source license, with
15 no warranty. The complete license can be found in license.txt and
16 http://www.cisst.org/cisst/license.txt.
17 
18 --- end cisst license ---
19 
20 */
21 
22 #ifndef _svlFileHandlers_h
23 #define _svlFileHandlers_h
24 
26 
27 // Always include last!
29 
30 #define SVL_FH_MAX_EXTENSIONS 64
31 #define SVL_FH_MAX_EXTENSION_LEN 64
32 
33 /*************************************/
34 /*** svlImageFile class **************/
35 /*************************************/
36 
38 {
39 public:
40  svlImageFile();
41  virtual ~svlImageFile();
42  virtual svlImageFile* GetInstance();
43 
44  virtual int ExtractDimensions(const char * filepath, int & width, int & height);
45  virtual int Open(const char * filepath, svlImageProperties & properties);
46  virtual int ReadAndClose(unsigned char * buffer, unsigned int size);
47  virtual int Create(const char * filepath, svlImageProperties * properties, unsigned char * buffer);
48 };
49 
50 /*************************************/
51 /*** svlImageFileTypeList class ******/
52 /*************************************/
53 
55 {
56 public:
59 
60  void AddType(const char* extension, svlImageFile* prototype);
61  svlImageFile* GetHandlerInstance(const char* extension);
62 
63 private:
66 };
67 
68 #endif // _svlFileHandlers_h
69 
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
Definition: svlFileHandlers.h:37
#define SVL_FH_MAX_EXTENSION_LEN
Definition: svlFileHandlers.h:31
Macros to export the symbols of cisstStereoVision (in a Dll).
#define SVL_FH_MAX_EXTENSIONS
Definition: svlFileHandlers.h:30
Definition: svlFileHandlers.h:54