GDCM 2.2.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Directories
- Examples

- File List
- File Members

gdcmPythonFilter.h
Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program: GDCM (Grassroots DICOM). A DICOM library
    00004
    00005   Copyright (c) 2006-2011 Mathieu Malaterre
    00006   All rights reserved.
    00007   See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
    00008
    00009      This software is distributed WITHOUT ANY WARRANTY; without even
    00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00011      PURPOSE.  See the above copyright notice for more information.
    00012
    00013 =========================================================================*/
    00014 #ifndef GDCMPYTHONFILTER_H
    00015 #define GDCMPYTHONFILTER_H
    00016
    00017 #include <Python.h>
    00018
    00019 #include "gdcmDataElement.h"
    00020 #include "gdcmDicts.h"
    00021 #include "gdcmFile.h"
    00022
    00023 namespace gdcm
    00024 {
    00025
    00031 class GDCM_EXPORT PythonFilter
    00032 {
    00033 public:
    00034   PythonFilter();
    00035   ~PythonFilter();
    00036
    00037   void UseDictAlways(bool use) {}
    00038
    00039   // Allow user to pass in there own dicts
    00040   void SetDicts(const Dicts &dicts);
    00041
    00042   // Convert to string the ByteValue contained in a DataElement
    00043   PyObject *ToPyObject(const Tag& t) const;
    00044
    00045   void SetFile(const File& f) { F = f; }
    00046   File &GetFile() { return *F; }
    00047   const File &GetFile() const { return *F; }
    00048
    00049 private:
    00050   SmartPointer<File> F;
    00051 };
    00052
    00053 } // end namespace gdcm
    00054
    00055 #endif //GDCMPYTHONFILTER_H