GDCM
2.2.0
|
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 GDCMIPPSORTER_H 00015 #define GDCMIPPSORTER_H 00016 00017 #include "gdcmSorter.h" 00018 00019 #include <vector> 00020 #include <string> 00021 00022 namespace gdcm 00023 { 00043 class GDCM_EXPORT IPPSorter : public Sorter 00044 { 00045 public: 00046 IPPSorter(); 00047 ~IPPSorter(); 00048 00049 // FIXME: I do not like public virtual function... 00056 virtual bool Sort(std::vector<std::string> const & filenames); 00057 00065 void SetComputeZSpacing(bool b) { ComputeZSpacing = b; } 00069 void SetZSpacingTolerance(double tol) { ZTolerance = tol; } 00070 double GetZSpacingTolerance() const { return ZTolerance; } 00071 00081 void SetDirectionCosinesTolerance(double tol) { DirCosTolerance = tol; } 00082 double GetDirectionCosinesTolerance() const { return DirCosTolerance; } 00083 00090 double GetZSpacing() const { return ZSpacing; } 00091 00092 protected: 00093 bool ComputeZSpacing; 00094 double ZSpacing; 00095 double ZTolerance; 00096 double DirCosTolerance; 00097 00098 private: 00099 bool ComputeSpacing(std::vector<std::string> const & filenames); 00100 }; 00101 00102 00103 } // end namespace gdcm 00104 00105 #endif //GDCMIPPSORTER_H