// Copyright (C) 1999-2015
// Smithsonian Astrophysical Observatory, Cambridge, MA, USA
// For conditions of distribution and use, see copyright notice in "copyright"

#include "fitsimage.h"
#include "order.h"
#include "context.h"

/*
void FitsImage::order()
{
  if (manageOrder_) {
    if (order_)
      delete order_;
    if (orderdata_)
      delete orderdata_;
  }
  manageOrder_ =0;
  order_ = base_;
  orderdata_ = basedata_;

  int axesOrder = parent->currentContext->axesOrder();
  switch (axesOrder) {
  case 123:
    break;
  case 132:
  case 213:
  case 231:
  case 312:
  case 321:
    {
      order_ = new FitsOrder(base_, axesOrder);
      if (order_->isValid()) {
	manageOrder_ =1;

	switch (order_->head()->hdu()->bitpix()) {
	case 8:
	  orderdata_ = new FitsDatam<unsigned char>(base_, parent);
	  break;
	case 16:
	  orderdata_ = new FitsDatam<short>(base_, parent);
	  break;
	case -16:
	  orderdata_ = new FitsDatam<unsigned short>(base_, parent);
	  break;
	case 32:
	  orderdata_ = new FitsDatam<int>(base_, parent);
	  break;
	case 64:
	  orderdata_ = new FitsDatam<long long>(base_, parent);
	  break;
	case -32:
	  orderdata_ = new FitsDatam<float>(base_, parent);
	  break;
	case -64:
	  orderdata_ = new FitsDatam<double>(base_, parent);
	  break;
	}
      }
      else {
	delete order_;
	order_ = base_;
	return;
      }
    }
  }
}

void FitsImage::updateOrder()
{
  // reset scanmode
  parent->resetScanMode();
  load();
}
*/
