# gdcmFileDerivation.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program: GDCM (Grassroots DICOM). A DICOM library
    00004   Module:  $URL$
    00005
    00006   Copyright (c) 2006-2010 Mathieu Malaterre
    00007   All rights reserved.
    00008   See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
    00009
    00010      This software is distributed WITHOUT ANY WARRANTY; without even
    00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00012      PURPOSE.  See the above copyright notice for more information.
    00013
    00014 =========================================================================*/
    00015 #ifndef GDCMFILEDERIVATION_H
    00016 #define GDCMFILEDERIVATION_H
    00017
    00018 #include "gdcmFile.h"
    00019
    00020 namespace gdcm
    00021 {
    00022
    00023 class FileDerivationInternals;
    00024 class DataSet;
    00038 class GDCM_EXPORT FileDerivation
    00039 {
    00040 public:
    00041   FileDerivation();
    00042   ~FileDerivation();
    00043
    00048   bool AddReference(const char *referencedsopclassuid, const char *referencedsopinstanceuid);
    00049
    00050   // CID 7202 Source Image Purposes of Reference
    00051   // {"DCM",121320,"Uncompressed predecessor"},
    00052
    00054   void SetPurposeOfReferenceCodeSequenceCodeValue(unsigned int codevalue);
    00055
    00056   // CID 7203 Image Derivation
    00057   // { "DCM",113040,"Lossy Compression" },
    00058
    00060   void SetDerivationCodeSequenceCodeValue(unsigned int codevalue);
    00061
    00063   void SetDerivationDescription( const char *dd );
    00064
    00066   bool Derive();
    00067
    00069   void SetFile(const File& f) { F = f; }
    00070   File &GetFile() { return *F; }
    00071   const File &GetFile() const { return *F; }
    00072
    00073 protected:
    00074   bool AddDerivationDescription();
    00075   bool AddSourceImageSequence();
    00076   bool AddPurposeOfReferenceCodeSequence(DataSet &ds);
    00077
    00078 private:
    00079   SmartPointer<File> F;
    00080   FileDerivationInternals *Internals;
    00081 };
    00082
    00090 } // end namespace gdcm
    00091
    00092 #endif //GDCMFILEDERIVATION_H
    00093