Program: gdcm
Module: $RCSfile: gdcmSegmentedPalette.h,v $
Language: C++
- Date: $Date: 2007/10/03 13:18:28 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2007/10/08 15:20:17 $
+ Version: $Revision: 1.9 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include <vector>
#include <iterator>
+// Hack for VS6
+#if defined(_MSC_VER) && (_MSC_VER < 1310)
+#define GDCM_TYPENAME class
+#else
+#define GDCM_TYPENAME typename
+#endif
+
namespace GDCM_NAME_SPACE
{
// abstract class for segment.
- template <typename EntryType>
+ template <GDCM_TYPENAME EntryType>
class Segment {
public:
typedef std::map<const EntryType*, const Segment*> SegmentMap;
};
// discrete segment (opcode = 0)
- template <typename EntryType>
+ template <GDCM_TYPENAME EntryType>
class DiscreteSegment : public Segment<EntryType> {
public:
typedef typename Segment<EntryType>::SegmentMap SegmentMap;
};
// linear segment (opcode = 1)
- template <typename EntryType>
+ template <GDCM_TYPENAME EntryType>
class LinearSegment : public Segment<EntryType> {
public:
typedef typename Segment<EntryType>::SegmentMap SegmentMap;
};
// indirect segment (opcode = 2)
- template <typename EntryType>
+ template <GDCM_TYPENAME EntryType>
class IndirectSegment : public Segment<EntryType> {
public:
typedef typename Segment<EntryType>::SegmentMap SegmentMap;
}
};
- template <typename EntryType>
+ template <GDCM_TYPENAME EntryType>
void ExpandPalette(const EntryType* raw_values, uint32_t length,
std::vector<EntryType>& palette)
{
} // end namespace gdcm
+// do not pollute namespace:
+#undef GDCM_TYPENAME
+
#endif