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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
|
//
// Lynkeos
// $Id: MyChromaticAlignerView.h 568 2014-01-28 21:58:56Z j-etienne $
//
// Created by Jean-Etienne LAMIAUD on Sun Mar 30 2008.
// Copyright (c) 2008-2014. Jean-Etienne LAMIAUD
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
/*!
* @header
* @abstract View controller for the chromatic alignment.
*/
#ifndef __MYCHROMATICALIGNERVIEW_H
#define __MYCHROMATICALIGNERVIEW_H
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
#include "LynkeosProcessingView.h"
#include "LynkeosStandardImageBuffer.h"
#include "MyImageStackerView.h"
/*!
* @abstract Reference string for this process
* @ingroup Processing
*/
extern NSString * const myChromaticAlignerRef;
/*!
* @abstract Reference for reading/setting the chromatic dispersion results.
* @ingroup Processing
*/
extern NSString * const myChromaticAlignerOffsetsRef;
/*!
* @abstract Chromatic alignment offsets
* @ingroup Processing
*/
@interface MyChromaticAlignParameter : NSObject <LynkeosProcessingParameter>
{
@public
u_short _numOffsets; //!< Number of offsets (or planes)
NSPointArray _offsets; //!< Offsets for each color plane
}
/*!
* @abstract Dedicated initializer
* @param size The number of plane offsets
*/
- (id) initWithOffsetNumber:(u_short)size;
@end
/*!
* @abstract View controlling the chromatic alignment
* @ingroup Processing
*/
@interface MyChromaticAlignerView : NSObject <LynkeosProcessingView>
{
IBOutlet NSView *_panel; //!< The view
IBOutlet NSMatrix *_offsetNames; //!< Name of color planes
IBOutlet NSMatrix *_offsetTextFields; //!< Offset value text fields
IBOutlet NSMatrix *_offsetSliders; //!< Offset value sliders
IBOutlet NSButton *_automaticOffsetsButton; //!< To auto align colors
//! Stack again, taking the chromatic correction into account
IBOutlet NSButton *_reStackButton;
IBOutlet NSButton *_originalCheckBox; //!< Blink with the original
id <LynkeosViewDocument> _document; //!< The doc we belong to
id <LynkeosWindowController> _window; //!< Our window controller
id <LynkeosImageView> _imageView; //!< To display the image
LynkeosProcessableImage *_item; //!< The item being corrected
MyChromaticAlignParameter *_params; //!< The color offsets
LynkeosStandardImageBuffer *_originalImage; //!< Uncorrected image
LynkeosStandardImageBuffer *_processedImage; //!< Corrected image
//! Initial offsets, when starting the item
NSPointArray _originalOffsets;
//! Expansion that was used during stacking
u_short _stackingFactor;
MyImageStackerView *_stacker; //!< To instruct it to re-stack
}
/*!
* @abstract A plane offset was manually changed
* @param sender The control which value was modified
*/
- (IBAction) changeOffset:(id)sender ;
/*!
* @abstract Blink between orinal and corrected images
* @param sender The control which value was modified
*/
- (IBAction) showOriginal:(id)sender ;
/*!
* @abstract Try to align the planes automatically
* @param sender The control which value was modified
*/
- (IBAction) automaticOffsets:(id)sender ;
/*!
* @abstract Stack the images again, taking the chromatic correction into account
* @param sender The control which value was modified
*/
- (IBAction) reStack:(id)sender ;
@end
#endif
|