summaryrefslogtreecommitdiffstats
path: root/tksao/fitsy++/hist.h
blob: 4def2a2912129b42d97bd41f9e7dd1c16095a0ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Copyright (C) 1999-2018
// Smithsonian Astrophysical Observatory, Cambridge, MA, USA
// For conditions of distribution and use, see copyright notice in "copyright"

#ifndef __fitshist_h__
#define __fitshist_h__

#include "vector.h"
#include "file.h"

class FitsHist : public FitsFile {
 public:
  enum Function {SUM, AVERAGE};

 private:
  int width_;
  int height_;
  int depth_;
  size_t size_;

  FitsColumn* xcol_;
  FitsColumn* ycol_;
  FitsColumn* zcol_;

  void* fitsy_;
  void* filter_;

  int initHeader(FitsFile*);
  int screenKeyword(const char*);
  void initLTMV(Matrix&);
  void initWCS(FitsFile*, Matrix&, Vector);
  void mapWCSMatrix(FitsHead*, char* w, const char* out, const char* in, 
		    Vector);
  void mapWCSReal(FitsHead* head, const char* out, const char* in);
  void mapWCSReal(FitsHead* head, char* w, const char* out, const char* in);
  void mapWCSReal(FitsHead*, char* w, 
		  const char* out, const char* prim, const char* alt, 
		  Matrix);
  void mapWCSString(FitsHead*, char* w, const char* out, const char* prim);
  void mapWCSString(FitsHead*, char* w, 
		    const char* out, const char* prim, const char* alt);
  void mapWCSVector(FitsHead*, char* w, const char* out, const char* in);
  void initFilter(FitsFile*);
  void deleteFilter();
  void bin(FitsFile*, Matrix&, Function, Vector);
  void swap();

 public:
  FitsHist(FitsFile* src, int width, int height, int depth, 
	   Matrix& m, Function func, Vector block);
  ~FitsHist();
};

class FitsHistNext : public FitsFile {
public:
  FitsHistNext(FitsFile* prev);
};

#endif