ngc 1.4.0
 
Loading...
Searching...
No Matches
ngcdttPUBLISH.hpp
Go to the documentation of this file.
1
7#ifndef ngcdttPUBLISH_H
8#define ngcdttPUBLISH_H
9
10
11#ifndef __cplusplus
12#error This is a C++ include file and cannot be used from plain C
13#endif
14
15/*
16 * System Headers
17 */
18
19/*
20 * Local Headers
21 */
22#include <ngc/core/ngcppInt.h>
23
27#define ngcdttPUBLISH_MAXBUF 8
28
34 char *memPtr;
35
38
40 int locked;
41
43 int sub;
44
47 memPtr = NULL;
49 locked = 0;
50 sub = 0;
51 }
52};
53
57class ngcdttFP {
58public:
61
64 enabled = 0; size_ = 0; dtype_ = ngcppDTYPE_BYTE; dtypeOrig_ = dtype_;
65 }
66
68 virtual ~ngcdttFP() {
69 Clear();
70 }
71
73 void Clear() {
74 if (frame_.memPtr != NULL)
75 {
76 free(frame_.memPtr); frame_.memPtr = NULL;
77 }
78 ngcppHdrInit(&frame_.hdr);
79 size_ = 0;
80 }
81
84 int size = f->hdr.nx * f->hdr.ny;
85
86 if (f->memPtr == NULL)
87 {
88 /*
89 * We simply do not store this
90 */
91 return (ngcbSUCCESS);
92 }
93
94 if (Stored() && f->sub)
95 {
96 if (Add_(f) != ngcbSUCCESS)
97 {
98 Clear();
99 return (ngcbFAILURE);
100 }
101 }
102
103 switch (f->hdr.dtype)
104 {
105 case ngcppDTYPE_INT16:
107 {
108 size *= 2; break;
109 }
110 case ngcppDTYPE_INT32:
112 {
113 size *= 4; break;
114 }
115 case ngcppDTYPE_INT64:
117 {
118 size *= 8; break;
119 }
120 default:
121 break;
122 }
123
124 /*
125 * Allocate
126 */
127 if (frame_.memPtr == NULL)
128 {
129 frame_.memPtr = (char *)malloc(size);
130 if (frame_.memPtr == NULL)
131 {
132 return (ngcbFAILURE);
133 }
134 size_ = size;
135 }
136 else if (size_ != size)
137 {
138 char *p = (char *)realloc(frame_.memPtr, size);
139 if (p == NULL)
140 {
141 Clear();
142 return (ngcbFAILURE);
143 }
144 else
145 {
146 frame_.memPtr = p;
147 size_ = size;
148 }
149 }
150
151 /*
152 * Copy header + data
153 */
154 memcpy(&frame_.hdr, &f->hdr, sizeof(ngcpp_hdr_t));
155 memcpy(frame_.memPtr, f->memPtr, size_);
156
157 return (ngcbSUCCESS);
158 }
159
161 int Store(const char *fileName) {
162 ngcb_cube_t cube;
163 char erms[256];
164 int size;
165
166 /*
167 * Open FITS-file
168 */
169 if (ngcbCubeOpen(fileName, &cube, erms) != ngcbSUCCESS)
170 {
171 /*
172 * We simply do nothing
173 */
174 return (ngcbSUCCESS);
175 }
176
177 if ((cube.bitPix != 16) && (cube.bitPix != 32) &&
178 (cube.bitPix != -32) && (cube.bitPix != -64))
179 {
180 /*
181 * The format is not supported - we do not load this
182 */
183 ngcbCubeClose(cube);
184 return (ngcbSUCCESS);
185 }
186
187 size = cube.naxis1 * cube.naxis2 * abs(cube.bitPix / 8);
188 if (size < 0)
189 {
190 /*
191 * The format is not supported - we do not load this
192 */
193 ngcbCubeClose(cube);
194 return (ngcbSUCCESS);
195 }
196
197 /*
198 * Allocate
199 */
200 if (frame_.memPtr == NULL)
201 {
202 frame_.memPtr = (char *)malloc(size);
203 if (frame_.memPtr == NULL)
204 {
205 ngcbCubeClose(cube);
206 return (ngcbFAILURE);
207 }
208 size_ = size;
209 }
210 else if (size_ != size)
211 {
212 char *p = (char *)realloc(frame_.memPtr, size);
213 if (p == NULL)
214 {
215 Clear();
216 ngcbCubeClose(cube);
217 return (ngcbFAILURE);
218 }
219 else
220 {
221 frame_.memPtr = p;
222 size_ = size;
223 }
224 }
225
226 /*
227 * Copy header + data
228 */
229 ngcppHdrInit(&frame_.hdr);
230 if (ngcbCubeRead(cube, frame_.memPtr, 0, erms) != ngcbSUCCESS)
231 {
232 Clear();
233 ngcbCubeClose(cube);
234 return (ngcbFAILURE);
235 }
236 frame_.hdr.nx = cube.naxis1;
237 frame_.hdr.ny = cube.naxis2;
238 switch (cube.bitPix)
239 {
240 case 16:
241 {
242 frame_.hdr.dtype = ngcppDTYPE_INT16;
243 frame_.hdr.bzero = (int)cube.bzero;
244 break;
245 }
246 case 32:
247 {
248 frame_.hdr.dtype = ngcppDTYPE_INT32;
249 break;
250 }
251 case -32:
252 {
253 frame_.hdr.dtype = ngcppDTYPE_REAL32;
254 break;
255 }
256 case -64:
257 {
258 frame_.hdr.dtype = ngcppDTYPE_REAL64;
259 break;
260 }
261 default:
262 {
263 frame_.hdr.dtype = ngcppDTYPE_REAL32;
264 break;
265 }
266 }
267
268 ngcbCubeClose(cube);
269
270 return (ngcbSUCCESS);
271 }
272
274 int Stored() {return ((frame_.memPtr != NULL));}
275
278 int i, n;
279
280 if (!Stored() || !enabled) return (ngcbSUCCESS);
281
282 /*
283 * Check compatibility
284 */
285 if ((f->hdr.nx != frame_.hdr.nx) || (f->hdr.ny != frame_.hdr.ny))
286 {
287 return (ngcbFAILURE);
288 }
289
290 n = f->hdr.nx * f->hdr.ny;
291 dtypeOrig_ = f->hdr.dtype;
292
293 if (f->hdr.dtype == ngcppDTYPE_REAL32)
294 {
295 float *p1 = (float *)(void *)f->memPtr;
296 if (frame_.hdr.dtype == ngcppDTYPE_REAL32)
297 {
298 float *p2 = (float *)(void *)frame_.memPtr;
299 for (i=0;i<n;i++)
300 {
301 *p1++ -= *p2++;
302 }
303 }
304 else if (frame_.hdr.dtype == ngcppDTYPE_INT32)
305 {
306 int *p2 = (int *)frame_.memPtr;
307 for (i=0;i<n;i++)
308 {
309 *p1++ -= (float)*p2++;
310 }
311 }
312 else if (frame_.hdr.dtype == ngcppDTYPE_INT16)
313 {
314 short *p2 = (short *)frame_.memPtr;
315 float bz = (float)frame_.hdr.bzero;
316 for (i=0;i<n;i++)
317 {
318 *p1++ -= ((float)*p2++ + bz);
319 }
320 }
321 else if (frame_.hdr.dtype == ngcppDTYPE_UINT16)
322 {
323 unsigned short *p2 = (unsigned short *)frame_.memPtr;
324 float bz = (float)frame_.hdr.bzero;
325 for (i=0;i<n;i++)
326 {
327 *p1++ -= ((float)*p2++ + bz);
328 }
329 }
330 else
331 {
332 return (ngcbFAILURE);
333 }
334 }
335 else if (f->hdr.dtype == ngcppDTYPE_INT32)
336 {
337 int *p1 = (int *)f->memPtr;
338 if (frame_.hdr.dtype == ngcppDTYPE_INT32)
339 {
340 int *p2 = (int *)frame_.memPtr;
341 for (i=0;i<n;i++)
342 {
343 *p1++ -= *p2++;
344 }
345 }
346 else if (frame_.hdr.dtype == ngcppDTYPE_INT16)
347 {
348 short *p2 = (short *)frame_.memPtr;
349 for (i=0;i<n;i++)
350 {
351 *p1++ -= ((int)*p2++ + frame_.hdr.bzero);
352 }
353 }
354 else if (frame_.hdr.dtype == ngcppDTYPE_UINT16)
355 {
356 unsigned short *p2 = (unsigned short *)frame_.memPtr;
357 for (i=0;i<n;i++)
358 {
359 *p1++ -= ((int)*p2++ + frame_.hdr.bzero);
360 }
361 }
362 else
363 {
364 return (ngcbFAILURE);
365 }
366 }
367 else if (f->hdr.dtype == ngcppDTYPE_REAL64)
368 {
369 double *p1 = (double *)(void *)f->memPtr;
370 if (frame_.hdr.dtype == ngcppDTYPE_REAL64)
371 {
372 double *p2 = (double *)(void *)frame_.memPtr;
373 for (i=0;i<n;i++)
374 {
375 *p1++ -= *p2++;
376 }
377 }
378 else if (frame_.hdr.dtype == ngcppDTYPE_REAL32)
379 {
380 float *p2 = (float *)(void *)frame_.memPtr;
381 for (i=0;i<n;i++)
382 {
383 *p1++ -= (double)*p2++;
384 }
385 }
386 else if (frame_.hdr.dtype == ngcppDTYPE_INT32)
387 {
388 int *p2 = (int *)frame_.memPtr;
389 for (i=0;i<n;i++)
390 {
391 *p1++ -= (double)*p2++;
392 }
393 }
394 else if (frame_.hdr.dtype == ngcppDTYPE_INT16)
395 {
396 short *p2 = (short *)frame_.memPtr;
397 double bz = (double)frame_.hdr.bzero;
398 for (i=0;i<n;i++)
399 {
400 *p1++ -= ((double)*p2++ + bz);
401 }
402 }
403 else if (frame_.hdr.dtype == ngcppDTYPE_UINT16)
404 {
405 unsigned short *p2 = (unsigned short *)frame_.memPtr;
406 double bz = (double)frame_.hdr.bzero;
407 for (i=0;i<n;i++)
408 {
409 *p1++ -= ((double)*p2++ + bz);
410 }
411 }
412 else
413 {
414 return (ngcbFAILURE);
415 }
416 }
417 else if (f->hdr.dtype == ngcppDTYPE_UINT16)
418 {
419 if (frame_.hdr.dtype == ngcppDTYPE_INT16)
420 {
421 unsigned short *p11 = (unsigned short *)f->memPtr;
422 unsigned short *p12 = p11 + n;
423 int *p1 = (int *)f->memPtr;
424 short *p2 = (short *)frame_.memPtr;
425
426 memcpy(p12, p11, n * sizeof(unsigned short));
427 for (i=0;i<n;i++)
428 {
429 *p1++ = (int)*p12++ - ((int)*p2++ + frame_.hdr.bzero);
430 }
432 }
433 else if (frame_.hdr.dtype == ngcppDTYPE_UINT16)
434 {
435 unsigned short *p11 = (unsigned short *)f->memPtr;
436 unsigned short *p12 = p11 + n;
437 int *p1 = (int *)f->memPtr;
438 unsigned short *p2 = (unsigned short *)frame_.memPtr;
439
440 memcpy(p12, p11, n * sizeof(unsigned short));
441 for (i=0;i<n;i++)
442 {
443 *p1++ = (int)*p12++ - ((int)*p2++ + frame_.hdr.bzero);
444 }
446 }
447 else
448 {
449 return (ngcbFAILURE);
450 }
451 }
452 else if (f->hdr.dtype == ngcppDTYPE_INT16)
453 {
454 if (frame_.hdr.dtype == ngcppDTYPE_INT16)
455 {
456 short *p11 = (short *)f->memPtr;
457 short *p12 = p11 + n;
458 int *p1 = (int *)f->memPtr;
459 short *p2 = (short *)frame_.memPtr;
460
461 memcpy(p12, p11, n * sizeof(short));
462 for (i=0;i<n;i++)
463 {
464 *p1++ = (int)*p12++ - ((int)*p2++ + frame_.hdr.bzero);
465 }
467 }
468 else if (frame_.hdr.dtype == ngcppDTYPE_UINT16)
469 {
470 short *p11 = (short *)f->memPtr;
471 short *p12 = p11 + n;
472 int *p1 = (int *)f->memPtr;
473 unsigned short *p2 = (unsigned short *)frame_.memPtr;
474
475 memcpy(p12, p11, n * sizeof(short));
476 for (i=0;i<n;i++)
477 {
478 *p1++ = (int)*p12++ - ((int)*p2++ + frame_.hdr.bzero);
479 }
481 }
482 else
483 {
484 return (ngcbFAILURE);
485 }
486 }
487 else
488 {
489 f->sub = 0;
490 dtype_ = ngcppFRAME_ANY;
491 return (ngcbFAILURE);
492 }
493
494 f->sub = 1;
495 dtype_ = f->hdr.dtype;
496
497 return (ngcbSUCCESS);
498 }
499
500protected:
501
502private:
504 ngcdtt_frame_t frame_;
505
507 int size_;
508
510 int dtype_;
511
513 int dtypeOrig_;
514
516 int Add_(ngcdtt_frame_t *f) {
517 int i, n;
518
519 if (!Stored() || !enabled) return (ngcbSUCCESS);
520
521 /*
522 * Check compatibility
523 */
524 if ((f->hdr.nx != frame_.hdr.nx) || (f->hdr.ny != frame_.hdr.ny) ||
525 (f->hdr.dtype != dtype_))
526 {
527 return (ngcbFAILURE);
528 }
529
530 n = f->hdr.nx * f->hdr.ny;
531
532 if (f->hdr.dtype == ngcppDTYPE_REAL32)
533 {
534 float *p1 = (float *)(void *)f->memPtr;
535 if (frame_.hdr.dtype == ngcppDTYPE_REAL32)
536 {
537 float *p2 = (float *)(void *)frame_.memPtr;
538 for (i=0;i<n;i++)
539 {
540 *p1++ += *p2++;
541 }
542 }
543 else if (frame_.hdr.dtype == ngcppDTYPE_INT32)
544 {
545 int *p2 = (int *)frame_.memPtr;
546 for (i=0;i<n;i++)
547 {
548 *p1++ += (float)*p2++;
549 }
550 }
551 else if (frame_.hdr.dtype == ngcppDTYPE_INT16)
552 {
553 short *p2 = (short *)frame_.memPtr;
554 float bz = (float)frame_.hdr.bzero;
555 for (i=0;i<n;i++)
556 {
557 *p1++ += (float)*p2++ + bz;
558 }
559 }
560 else if (frame_.hdr.dtype == ngcppDTYPE_UINT16)
561 {
562 unsigned short *p2 = (unsigned short *)frame_.memPtr;
563 float bz = (float)frame_.hdr.bzero;
564 for (i=0;i<n;i++)
565 {
566 *p1++ += (float)*p2++ + bz;
567 }
568 }
569 else
570 {
571 return (ngcbFAILURE);
572 }
573 }
574 else if (f->hdr.dtype == ngcppDTYPE_INT32)
575 {
576 if (dtypeOrig_ != f->hdr.dtype)
577 {
578 if (frame_.hdr.dtype == ngcppDTYPE_INT16)
579 {
580 if (dtypeOrig_ == ngcppDTYPE_INT16)
581 {
582 short *p1 = (short *)f->memPtr;
583 short *p2 = (short *)frame_.memPtr;
584 int *p11 = (int *)f->memPtr;
585 for (i=0;i<n;i++)
586 {
587 *p1++ = (short)(*p11++ + *p2++ + frame_.hdr.bzero);
588 }
589 }
590 else if (dtypeOrig_ == ngcppDTYPE_UINT16)
591 {
592 unsigned short *p1 = (unsigned short *)f->memPtr;
593 short *p2 = (short *)frame_.memPtr;
594 int *p11 = (int *)f->memPtr;
595 for (i=0;i<n;i++)
596 {
597 *p1++ = (unsigned short)(*p11++ + *p2++ + frame_.hdr.bzero);
598 }
599 }
600 else
601 {
602 return (ngcbFAILURE);
603 }
604 f->hdr.dtype = dtypeOrig_;
605 }
606 else if (frame_.hdr.dtype == ngcppDTYPE_UINT16)
607 {
608 if (dtypeOrig_ == ngcppDTYPE_INT16)
609 {
610 short *p1 = (short *)f->memPtr;
611 unsigned short *p2 = (unsigned short *)frame_.memPtr;
612 int *p11 = (int *)f->memPtr;
613 for (i=0;i<n;i++)
614 {
615 *p1++ = (short)(*p11++ + *p2++ + frame_.hdr.bzero);
616 }
617 }
618 else if (dtypeOrig_ == ngcppDTYPE_UINT16)
619 {
620 unsigned short *p1 = (unsigned short *)f->memPtr;
621 unsigned short *p2 = (unsigned short *)frame_.memPtr;
622 int *p11 = (int *)f->memPtr;
623 for (i=0;i<n;i++)
624 {
625 *p1++ = (unsigned short)(*p11++ + *p2++ + frame_.hdr.bzero);
626 }
627 }
628 else
629 {
630 return (ngcbFAILURE);
631 }
632 f->hdr.dtype = dtypeOrig_;
633 }
634 else
635 {
636 return (ngcbFAILURE);
637 }
638 }
639 else
640 {
641 int *p1 = (int *)f->memPtr;
642 if (frame_.hdr.dtype == ngcppDTYPE_INT32)
643 {
644 int *p2 = (int *)frame_.memPtr;
645 for (i=0;i<n;i++)
646 {
647 *p1++ += *p2++;
648 }
649 }
650 else if (frame_.hdr.dtype == ngcppDTYPE_INT16)
651 {
652 short *p2 = (short *)frame_.memPtr;
653 for (i=0;i<n;i++)
654 {
655 *p1++ += (int)*p2++ + frame_.hdr.bzero;
656 }
657 }
658 else if (frame_.hdr.dtype == ngcppDTYPE_UINT16)
659 {
660 unsigned short *p2 = (unsigned short *)frame_.memPtr;
661 for (i=0;i<n;i++)
662 {
663 *p1++ += (int)*p2++ + frame_.hdr.bzero;
664 }
665 }
666 else
667 {
668 return (ngcbFAILURE);
669 }
670 }
671 }
672 else if (f->hdr.dtype == ngcppDTYPE_REAL64)
673 {
674 double *p1 = (double *)(void *)f->memPtr;
675 if (frame_.hdr.dtype == ngcppDTYPE_REAL64)
676 {
677 double *p2 = (double *)(void *)frame_.memPtr;
678 for (i=0;i<n;i++)
679 {
680 *p1++ += *p2++;
681 }
682 }
683 else if (frame_.hdr.dtype == ngcppDTYPE_REAL32)
684 {
685 float *p2 = (float *)(void *)frame_.memPtr;
686 for (i=0;i<n;i++)
687 {
688 *p1++ += (double)*p2++;
689 }
690 }
691 else if (frame_.hdr.dtype == ngcppDTYPE_INT32)
692 {
693 int *p2 = (int *)frame_.memPtr;
694 for (i=0;i<n;i++)
695 {
696 *p1++ += (double)*p2++;
697 }
698 }
699 else if (frame_.hdr.dtype == ngcppDTYPE_INT16)
700 {
701 short *p2 = (short *)frame_.memPtr;
702 double bz = (double)frame_.hdr.bzero;
703 for (i=0;i<n;i++)
704 {
705 *p1++ += (double)*p2++ + bz;
706 }
707 }
708 else if (frame_.hdr.dtype == ngcppDTYPE_UINT16)
709 {
710 unsigned short *p2 = (unsigned short *)frame_.memPtr;
711 double bz = (double)frame_.hdr.bzero;
712 for (i=0;i<n;i++)
713 {
714 *p1++ += (double)*p2++ + bz;
715 }
716 }
717 else
718 {
719 return (ngcbFAILURE);
720 }
721 }
722 else
723 {
724 return (ngcbFAILURE);
725 }
726
727 f->sub = 0;
728
729 return (ngcbSUCCESS);
730 }
731};
732
737public:
740
742 char uri[256];
743
745 ngcdttPUBLISH();
746
748 explicit ngcdttPUBLISH(int n);
749
751 virtual ~ngcdttPUBLISH();
752
755
758
760 char *ErrMsg();
761
763 const char *Type();
764
766 int BytesPerPix(int dataType);
767
769 int Size(ngcpp_hdr_t hdr);
770
772 int NumBuf();
773
775 void NumBuf(int n);
776
779
781 int Publish();
782
784 int TryLock();
785
787 int Lock();
788
790 int Unlock();
791
793 void Invalidate();
794
795 /*
796 * Virtual interface
797 */
798
800 virtual int Configure(const char *name, int nx, int ny);
801
803 virtual void Shutdown();
804
806 virtual int IdxOut();
807
809 virtual int IdxIn();
810
812 virtual int Locked(int idx);
813
815 virtual int Lock(int idx);
816
818 virtual int TryLock(int idx);
819
821 virtual int Unlock(int idx);
822
824 virtual int Wait(int idx);
825
827 virtual int Publish(int idx);
828
830 virtual void Invalidate(int idx);
831
832protected:
833 void Type(const char *name);
834
835private:
837 void Init_();
838
840 void Shutdown_();
841
843 char erms_[256];
844
846 int numBuf_;
847
849 char type_[64];
850};
851
852#endif
int Store(const char *fileName)
Store FITS-frame.
Definition ngcdttPUBLISH.hpp:161
int Store(ngcdtt_frame_t *f)
Store given frame.
Definition ngcdttPUBLISH.hpp:83
int Stored()
Stored.
Definition ngcdttPUBLISH.hpp:274
int Sub(ngcdtt_frame_t *f)
Subtract from frame.
Definition ngcdttPUBLISH.hpp:277
ngcdttFP()
Constructor.
Definition ngcdttPUBLISH.hpp:63
int enabled
Subtraction enabled;.
Definition ngcdttPUBLISH.hpp:60
virtual ~ngcdttFP()
Destructor.
Definition ngcdttPUBLISH.hpp:68
void Clear()
Clear.
Definition ngcdttPUBLISH.hpp:73
int TryLock()
Try to lock current frame bbuffer.
Definition ngcdttPUBLISH.cpp:105
virtual ~ngcdttPUBLISH()
Destructor.
Definition ngcdttPUBLISH.cpp:34
int initialized
Initialized (flag)
Definition ngcdttPUBLISH.hpp:739
int Size(ngcpp_hdr_t hdr)
Compute frame size in bytes.
Definition ngcdttPUBLISH.cpp:84
const char * Type()
Return display type.
Definition ngcdttPUBLISH.cpp:61
virtual int Locked(int idx)
Check whether the image stored in frame[idx] is locked.
Definition ngcdttPUBLISH.cpp:169
int NumBuf()
Return number of available display buffers.
Definition ngcdttPUBLISH.cpp:89
int Lock()
Lock current frame buffer.
Definition ngcdttPUBLISH.cpp:107
virtual int IdxOut()
Return actual display buffer index.
Definition ngcdttPUBLISH.cpp:161
char uri[256]
URI, if applicable.
Definition ngcdttPUBLISH.hpp:742
void Invalidate()
Invalidate current frame buffer.
Definition ngcdttPUBLISH.cpp:111
char * ErrMsg()
Return actual error message.
Definition ngcdttPUBLISH.cpp:65
int Unlock()
Unlock current frame buffer.
Definition ngcdttPUBLISH.cpp:109
virtual int Wait(int idx)
Wait until the image stored in frame[idx] is unlocked.
Definition ngcdttPUBLISH.cpp:210
int frameId
Unique frame-id for display.
Definition ngcdttPUBLISH.hpp:754
virtual void Shutdown()
Shutdown publisher.
Definition ngcdttPUBLISH.cpp:151
ngcdtt_frame_t * frame
Frames array.
Definition ngcdttPUBLISH.hpp:757
virtual int IdxIn()
Return the buffer index to be used for next transfer.
Definition ngcdttPUBLISH.cpp:153
int BytesPerPix(int dataType)
Return number of bytes per pixel for specific data type.
Definition ngcdttPUBLISH.cpp:67
ngcdttPUBLISH()
Constructor.
Definition ngcdttPUBLISH.cpp:22
int Publish()
Publish current frame buffer.
Definition ngcdttPUBLISH.cpp:103
ngcdtt_frame_t * Frame()
Get current frame slot.
Definition ngcdttPUBLISH.cpp:98
virtual int Configure(const char *name, int nx, int ny)
Initialize/configure publisher.
Definition ngcdttPUBLISH.cpp:113
int ngcbCubeOpen(const char *fileName, ngcb_cube_t *cube, char *erms)
Definition ngcbFitsTools.c:1794
#define ngcbSUCCESS
Definition ngcb.h:137
void ngcbCubeClose(ngcb_cube_t cube)
Definition ngcbFitsTools.c:2139
int ngcbCubeRead(ngcb_cube_t cube, void *buffer, int slice, char *erms)
Definition ngcbFitsTools.c:2043
#define ngcbFAILURE
Definition ngcb.h:139
#define ngcppDTYPE_UINT16
Definition ngcppInt.h:220
#define ngcppDTYPE_INT64
Definition ngcppInt.h:218
#define ngcppDTYPE_BYTE
Definition ngcppInt.h:213
#define ngcppDTYPE_REAL64
Definition ngcppInt.h:215
#define ngcppDTYPE_INT16
Definition ngcppInt.h:216
#define ngcppDTYPE_INT32
Definition ngcppInt.h:217
#define ngcppDTYPE_REAL32
Definition ngcppInt.h:214
#define ngcppFRAME_ANY
Definition ngcppInt.h:230
void ngcppHdrInit(ngcpp_hdr_t *hdr)
Definition ngcppDataRecv.c:370
Definition ngcb.h:1036
int naxis2
Definition ngcb.h:1041
double bzero
Definition ngcb.h:1044
int naxis1
Definition ngcb.h:1040
int bitPix
Definition ngcb.h:1039
Definition ngcdttPUBLISH.hpp:32
ngcdtt_frame_t()
Constructor.
Definition ngcdttPUBLISH.hpp:46
int locked
Flag indicating that the frame is locked.
Definition ngcdttPUBLISH.hpp:40
char * memPtr
Pointer to memory.
Definition ngcdttPUBLISH.hpp:34
int sub
Flag indicating that a bias frame has been subtracted.
Definition ngcdttPUBLISH.hpp:43
ngcpp_hdr_t hdr
Frame header (copy of last frame)
Definition ngcdttPUBLISH.hpp:37
Definition ngcppInt.h:516
int nx
Definition ngcppInt.h:521
int ny
Definition ngcppInt.h:522
int dtype
Definition ngcppInt.h:517