[1104] | 1 | // Classes image heritant de TMatrix<T>
|
---|
| 2 | // R.Ansari, C.Magneville 07/2000
|
---|
[220] | 3 | // LAL (Orsay) / IN2P3-CNRS DAPNIA/SPP (Saclay) / CEA
|
---|
| 4 |
|
---|
[244] | 5 | #include "machdefs.h"
|
---|
[220] | 6 | #include <stdio.h>
|
---|
[1104] | 7 | #include <stdlib.h>
|
---|
| 8 | #include "pexceptions.h"
|
---|
[220] | 9 | #include "cimage.h"
|
---|
| 10 |
|
---|
| 11 | template <class T>
|
---|
[1104] | 12 | Image<T>::Image()
|
---|
| 13 | // Constructeur par defaut.
|
---|
| 14 | : TMatrix<T>()
|
---|
[220] | 15 | {
|
---|
[1104] | 16 | SetOrg();
|
---|
| 17 | SetPixelSize();
|
---|
[220] | 18 | }
|
---|
| 19 |
|
---|
| 20 | template <class T>
|
---|
[1104] | 21 | Image<T>::Image(uint_4 sizx, uint_4 sizy, r_8 szpx, r_8 szpy, r_8 orgx, r_8 orgy)
|
---|
| 22 | // Constructeur par defaut.
|
---|
| 23 | : TMatrix<T>(sizy, sizx)
|
---|
[220] | 24 | {
|
---|
[1104] | 25 | SetOrg(orgx, orgy);
|
---|
| 26 | SetPixelSize(szpx, szpy);
|
---|
[220] | 27 | }
|
---|
| 28 |
|
---|
| 29 | template <class T>
|
---|
[1104] | 30 | Image<T>::Image(const Image<T>& a)
|
---|
| 31 | : TMatrix<T>(a)
|
---|
[220] | 32 | {
|
---|
[1104] | 33 | SetOrg(a.XOrg(), a.YOrg() );
|
---|
| 34 | SetPixelSize(a.XPixSize(), a.YPixSize());
|
---|
[220] | 35 | }
|
---|
| 36 |
|
---|
| 37 | template <class T>
|
---|
[1104] | 38 | Image<T>::Image(const Image<T>& a, bool share)
|
---|
| 39 | : TMatrix<T>(a, share)
|
---|
[220] | 40 | {
|
---|
[1104] | 41 | SetOrg(a.XOrg(), a.YOrg() );
|
---|
| 42 | SetPixelSize(a.XPixSize(), a.YPixSize());
|
---|
[220] | 43 | }
|
---|
| 44 | template <class T>
|
---|
| 45 | Image<T>::~Image()
|
---|
| 46 | {
|
---|
| 47 | }
|
---|
| 48 |
|
---|
[1104] | 49 | ///////////////////////////////////////////////////////////////
|
---|
[220] | 50 | #ifdef __CXX_PRAGMA_TEMPLATES__
|
---|
| 51 | #pragma define_template Image<uint_2>
|
---|
| 52 | #pragma define_template Image<int_4>
|
---|
[1104] | 53 | #pragma define_template Image<int_8>
|
---|
[220] | 54 | #pragma define_template Image<r_4>
|
---|
[1104] | 55 | #pragma define_template Image<r_8>
|
---|
| 56 | //#pragma define_template Image< complex<r_4> >
|
---|
| 57 | //#pragma define_template Image< complex<r_8> >
|
---|
[220] | 58 | #endif
|
---|
| 59 |
|
---|
[1104] | 60 | #if defined(ANSI_TEMPLATES) || defined(GNU_TEMPLATES)
|
---|
[220] | 61 | template class Image<uint_2>;
|
---|
| 62 | template class Image<int_4>;
|
---|
[1104] | 63 | template class Image<int_8>;
|
---|
[220] | 64 | template class Image<r_4>;
|
---|
[1104] | 65 | template class Image<r_8>;
|
---|
| 66 | //template class Image< complex<r_4> >;
|
---|
| 67 | //template class Image< complex<r_8> >;
|
---|
[220] | 68 | #endif
|
---|