00001 /* 00002 * Copyright (c) 1996, University of Amsterdam, The Netherlands. 00003 * All rights reserved. 00004 * 00005 * 00006 * Author(s): 00007 * Dennis Koelma (koelma@wins.uva.nl) 00008 * Edo Poll (poll@wins.uva.nl) 00009 */ 00010 00011 #ifndef HxImageSig2dByte_h 00012 #define HxImageSig2dByte_h 00013 00014 00015 #include "HxImageSignature.h" 00016 #include "HxPixelAllocator.h" 00017 00018 #include "HxByte.h" 00019 #include "HxScalarInt.h" 00020 #include "HxScalarDouble.h" 00021 #include "HxDataPtr2dScalarTem.h" 00022 00023 class HxImageSig2dInt; 00024 class HxImageSig2dDouble; 00025 00026 00029 class HxImageSig2dByte : public HxImageSignature { 00030 public: 00031 typedef HxByte PixelType; 00032 typedef HxScalarInt ArithType; 00033 typedef HxScalarDouble ArithTypeDouble; 00034 00035 typedef HxDataPtr2dScalarTem< 00036 PixelType, ArithType> DataPtrType; 00037 00038 typedef HxPixelAllocator<PixelType> Allocator; 00039 00040 typedef HxImageSig2dByte ProjectDomainImageSigType; 00041 typedef HxImageSig2dInt ArithImageSigType; 00042 typedef HxImageSig2dDouble ArithImageSigTypeDouble; 00043 00044 HxImageSig2dByte(); 00045 00046 enum { ID = SIG_ID(2, 1, INT_VALUE, sizeof(PixelType) << 3) }; 00047 }; 00048 00049 template<> 00050 struct HxClassName<HxImageSig2dByte> { 00051 operator HxString() { 00052 static HxImageSig2dByte sig; 00053 return sig.toString(); 00054 } 00055 }; 00056 00057 inline 00058 HxImageSig2dByte::HxImageSig2dByte() 00059 { 00060 _imageDimensionality = 2; 00061 _pixelDimensionality = 1; 00062 _pixelType = INT_VALUE; 00063 _pixelPrecision = sizeof(PixelType) << 3; 00064 } 00065 00066 #endif 00067