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