Example #1
0
        public FITSImageExtensionsSaver(JPFITS.FITSImageSet imageSet)
        {
            InitializeComponent();

            HEADER   = null;
            IMAGESET = imageSet;
            extensionsGridView.RowCount = IMAGESET.Count;
            string extname;
            int    c = 1;

            for (int i = 0; i < IMAGESET.Count; i++)
            {
                extname = IMAGESET[i].Header.GetKeyValue("EXTNAME");
                if (extname != "")
                {
                    extensionsGridView[0, i].Value = extname;
                }
                else
                {
                    extensionsGridView[0, i].Value = "EXT_" + c.ToString("000000");
                    c++;
                }

                int bzero = 0;
                try
                {
                    bzero = Convert.ToInt32(IMAGESET[i].Header.GetKeyValue("BZERO"));
                }
                catch { }

                extensionsGridView.Rows[i].Cells[1].Value = BITPIXtoString(Convert.ToInt32(IMAGESET[i].Header.GetKeyValue("BITPIX")), bzero);
            }
        }
Example #2
0
        public FITSHeaderViewer(JPFITS.FITSImageSet imageSet, int imageSetIndex)
        {
            InitializeComponent();

            IMAGESET            = imageSet;
            IMAGESETHEADERINDEX = imageSetIndex;
            HEADER    = IMAGESET[IMAGESETHEADERINDEX].Header;
            this.Text = "Header " + (IMAGESETHEADERINDEX + 1) + " of " + IMAGESET.Count + ": " + IMAGESET[IMAGESETHEADERINDEX].FileName;

            HeaderKeysListBox.SuspendLayout();
            HeaderKeysListBox.Items.Clear();
            HeaderKeysListBox.Items.AddRange(HEADER.GetFormattedHeaderBlock(false, true));
            HeaderKeysListBox.ResumeLayout();
        }
Example #3
0
        public FITSHeaderViewer(JPFITS.FITSHeader header)
        {
            InitializeComponent();

            IMAGESET = new FITSImageSet();
            IMAGESET.Add(new FITSImage("c:\\dum.fits", true));
            IMAGESET[0].Header  = header;
            IMAGESETHEADERINDEX = 0;

            HEADER = header;

            HeaderKeysListBox.SuspendLayout();
            HeaderKeysListBox.Items.Clear();
            HeaderKeysListBox.Items.AddRange(HEADER.GetFormattedHeaderBlock(false, true));
            HeaderKeysListBox.ResumeLayout();
        }