# gdcmFileExplicitFilter.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-2009 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 __gdcmFileExplicitFilter_h
    00016 #define __gdcmFileExplicitFilter_h
    00017
    00018 #include "gdcmFile.h"
    00019
    00020 namespace gdcm
    00021 {
    00022 class Dicts;
    00023
    00033 class GDCM_EXPORT FileExplicitFilter
    00034 {
    00035 public:
    00036   FileExplicitFilter():F(new File),ChangePrivateTags(false),UseVRUN(true),RecomputeItemLength(false),RecomputeSequenceLength(false) {}
    00037   ~FileExplicitFilter() {}
    00038
    00040   void SetChangePrivateTags(bool b) { ChangePrivateTags = b;}
    00041
    00043   void SetUseVRUN(bool b) { UseVRUN = b; }
    00044
    00046   void SetRecomputeItemLength(bool b);
    00047   void SetRecomputeSequenceLength(bool b);
    00048
    00050
    00052   bool Change();
    00053
    00055   void SetFile(const File& f) { F = f; }
    00056   File &GetFile() { return *F; }
    00057
    00058 protected:
    00059   bool ProcessDataSet(DataSet &ds, Dicts const & dicts);
    00060   bool ChangeFMI();
    00061
    00062 private:
    00063   SmartPointer<File> F;
    00064   bool ChangePrivateTags;
    00065   bool UseVRUN;
    00066   bool RecomputeItemLength;
    00067   bool RecomputeSequenceLength;
    00068 };
    00069
    00070
    00071 } // end namespace gdcm
    00072
    00073 #endif //__gdcmFileExplicitFilter_h
    00074