#include <stdlib.h>
#include <assert.h>
#include "corelation.h"
◆ corelation_peak()
◆ correlate()
◆ correlate_spectrums()
Definition: MyDocument.m:56
REAL * colorValue(FFT_DATA sample, u_short x, u_short y, u_char c)
Definition: fourier.c:283
bool alignImageUpdating()
Definition: MyUserPrefsController.m:207
int indexOfImage:(MyMovieImage *item)
Definition: MyImageListItem.m:537
Definition: processing_core.h:51
IBOutlet NSSlider * _unsharpRadius
Definition: MyImageListWindow.h:109
NSImage * _stackedImage
Definition: MyDocument.h:61
static const NSString * topRightImage
Definition: MyImageViewSelection.m:37
@ EntropyAnalysis
Definition: MyListProcessing.h:144
NSRect _right
Definition: MyImageView.h:57
IBOutlet NSTextField * _cropW
Definition: MyImageListWindow.h:104
static const NSPoint topSpot
Definition: MyImageViewSelection.m:46
static const NSString * leftImage
Definition: MyImageViewSelection.m:32
NSRect _topLeft
Definition: MyImageView.h:57
Definition: corelation.h:30
u_short height
Definition: LynkeosCommon.h:50
BOOL setBlackLevel:whiteLevel:(REAL black,[whiteLevel] REAL white)
Definition: MyImageList.m:234
id _threaded
Definition: MyDocument.m:51
NSCursor * _leftCursor
Definition: MyImageView.h:55
double val
Definition: corelation.h:34
NSMovie * _movie
Definition: MyImageListItem.h:144
u_short _height
Definition: MyPostProcessing.h:44
void ffmpegMovieBackToStart(FfmpegMovie *movie)
Definition: ffmpeg_access.c:197
#define K_ALIGN_TAB_IDENT
Definition: MyImageListWindow.m:31
IBOutlet NSSlider * _deconvThreshold
Definition: MyImageListWindow.h:108
void updateListControls()
Definition: MyImageListWindowPrivate.m:148
IBOutlet NSTextField * _searchFieldX
Definition: MyImageListWindow.h:92
void normalize_rgb(RGB *rgb, u_long length, double scale, BOOL mono)
Multiply the pixels by a scalar.
Definition: MyListProcessing.m:711
IBOutlet NSTextField * _analyzeFieldX
Definition: MyImageListWindow.h:97
@ DarkFrameMode
Definition: MyImageListWindow.h:46
IBOutlet NSSlider * _analysisLowerCutoffSlider
Definition: MyUserPrefsController.h:71
void analyzeQuality()
Definition: MyDocument.m:723
@ ProcessMode
Definition: MyImageListWindow.h:41
IBOutlet NSButton * _toggleButton
Definition: MyImageListWindow.h:90
u_short _cutoff
Definition: MyListProcessing.h:100
BOOL _monochromeFlat
Definition: MyDocumentData.h:52
#define K_MAX_ZOOM
Definition: MyImageView.m:33
ParalelOptimization_t
Definition: MyUserPrefsController.h:51
@ FFTW3ThreadsOptimization
Definition: MyUserPrefsController.h:54
#define FFT_PLAN_C2R
Definition: fourier.h:48
static pthread_mutex_t fftwLock
Definition: fourier.c:43
MyIntegerPoint _searchSquareOrigin
Definition: MyObjectImageList.h:41
REAL blackLevel()
Definition: MyImageList.m:178
double _minQuality
Definition: MyObjectImageList.h:46
int ffmpegNextFrame(FfmpegMovie *movie)
Definition: ffmpeg_access.c:45
char * ffmpegLastErrorOccured()
Definition: ffmpeg_access.c:191
static unsigned fftwDefaultFlag
Definition: fourier.c:41
MyImageListWindowMode
Definition: MyImageListWindow.h:44
NSString * windowStateName()
Definition: MyImageListWindowPrivate.m:29
#define K_ANALYSIS_METHOD_KEY
Definition: MyDocumentData.m:35
IBOutlet NSTextField * _cropH
Definition: MyImageListWindow.h:104
IBOutlet NSSlider * _analysisUpperCutoffSlider
Definition: MyUserPrefsController.h:73
void free_spectrum(FFT_DATA *s)
Definition: fourier.c:116
REAL whiteLevel()
Definition: MyImageList.m:179
void postProcessAction:(id sender)
Definition: MyImageListWindow.m:957
u_long stackSize()
Stack size in bytes.
Definition: MyImageList.m:177
NSPoint alignOffset()
Definition: MyImageListItem.m:135
static const NSString * crossImage
Definition: MyImageViewSelection.m:31
double uGain()
Definition: MyObjectImageList.m:217
IBOutlet NSTextField * _cropY
Definition: MyImageListWindow.h:104
NSPoint _searchSquareOrigin
Definition: MyDocumentData.h:73
@ Aligning
Definition: MyImageListWindow.h:38
REAL _maxLevel
Definition: MyDocument.h:64
NSSize imageSize()
Definition: MyImageListItem.m:150
MyIntegerPoint searchSquareOrigin()
Definition: MyImageListItem.m:131
Definition: MyImageViewSelection.m:73
u_short h
Definition: processing_core.h:69
double _alignFrequencyCutoff
Definition: MyUserPrefsController.h:86
AVFrame * pCurrentFrame
Definition: ffmpeg_access.h:10
NSLock * _qtLock
Definition: MyImageListItem.h:146
Movie model class.
Definition: MyImageListItem.h:140
IBOutlet NSSlider * _alignFrequencyCutoffSlider
Definition: MyUserPrefsController.h:65
u_char goal
Definition: processing_core.h:71
id _parent
Definition: MyImageListItem.h:116
int _analysisMethod
Definition: MyDocumentData.h:53
#define redValue(s, x, y)
Definition: fourier.h:78
Concrete MyListProcessing dedicated to image stacking.
Definition: MyListProcessing.h:188
long _index
Definition: MyImageListItem.h:118
NSBitmapImageRep * makeImageWithMin:Max:(REAL minV,[Max] REAL maxV)
Definition: MyPostProcessing.m:305
void updateAnalyzeControls()
Definition: MyImageListWindowPrivate.m:159
void changeReferenceEntry:(MyImageListItem *entry)
Definition: MyDocument.m:561
bool _alignImageUpdating
Definition: MyUserPrefsController.h:88
void corelation_peak(FFT_DATA result, CORRELATION_PEAK *peak)
Definition: corelation.c:117
Definition: processing_core.h:66
void getNumericPref:forKey:minValue:maxValue:(double *pref,[forKey] NSString *key,[minValue] double minv,[maxValue] double maxv)
Definition: MyUserPrefsController.m:41
int ffmpegLoadMovie(const char *movieName, FfmpegMovie *resultMovie)
Definition: ffmpeg_access.c:218
static char * _ffmpegLastErrorString
Definition: ffmpeg_access.c:38
double _analysisUpperCutoff
Definition: MyUserPrefsController.h:91
void processNextItem()
Definition: MyListProcessing.m:323
static const NSPoint bottomSpot
Definition: MyImageViewSelection.m:47
int _selection_state
Definition: MyImageListItem.h:56
NSCursor * _crossCursor
Definition: MyImageView.h:54
#define K_PREF_ALIGN_MULTIPROC
Definition: MyUserPrefsController.h:41
#define K_ANALYZE_TAB_IDENT
Definition: MyImageListWindow.m:32
MyIntegerPoint analyzeSquareOrigin()
Definition: MyObjectImageList.m:205
MyObjectImageList * _imageList
Definition: MyDocument.h:55
int _movieIndex
Definition: MyImageListEnumerator.h:51
double _analysisLowerCutoff
Definition: MyUserPrefsController.h:90
NSRect _left
Definition: MyImageView.h:57
Definition: MyImageView.h:80
void setSelected:(bool value)
Definition: MyImageListItem.m:157
MyImageList * darkFrameList()
Thermal noise images.
Definition: MyDocument.m:407
#define K_SELECTED_KEY
Definition: MyImageListItem.m:31
ParalelOptimization_t _alignMultiProc
Definition: MyUserPrefsController.h:89
void savePrefs()
Definition: MyUserPrefsController.m:137
u_short sizeFactor()
Definition: MyObjectImageList.m:212
NSMutableArray * _images
Definition: MyImageListItem.h:145
Movie image model class.
Definition: MyImageListItem.h:113
FFT_DATA _originalSpectrum
Definition: MyPostProcessing.h:38
RGB * stack()
Definition: MyImageList.m:176
IBOutlet NSSlider * _blackLevel
Definition: MyImageListWindow.h:110
RGB * _darkFrame
Definition: MyListProcessing.h:69
MyIntegerSize _size
Definition: MySizeLock.m:28
BOOL setProcessParameters:dRadius:dThreshold:uRadius:(double,[dRadius] double,[dThreshold] double,[uRadius] double uGain)
Definition: MyObjectImageList.m:332
u_short _precisionThreshold
Definition: MyListProcessing.h:101
Enumerator on MyImageList.
Definition: MyImageListEnumerator.h:44
RGB * _source
Definition: MyPostProcessing.h:37
RGB * _rgbSum
Definition: MyListProcessing.h:190
void process:seqnb:width:height:deconvRadius:deconvThreshold:unsharpRadius:unsharpGain:(RGB *src,[seqnb] long sequence,[width] u_short width,[height] u_short height,[deconvRadius] double dRadius,[deconvThreshold] double threshold,[unsharpRadius] double uRadius,[unsharpGain] double gain)
Definition: MyPostProcessing.m:206
Base model of a list of images to process.
Definition: MyImageList.h:44
IBOutlet NSTextField * _alignThresholdText
Definition: MyUserPrefsController.h:68
bool analysisImageUpdating()
Definition: MyUserPrefsController.m:215
BOOL _locked
Definition: MySizeLock.h:39
IBOutlet NSButton * _prevButton
Definition: MyImageListWindow.h:88
Definition: MyImageListItem.m:41
The document controler.
Definition: MyDocument.h:48
IBOutlet NSSlider * _unsharpGain
Definition: MyImageListWindow.h:109
IBOutlet MyImageView * _imageView
Definition: MyImageListWindow.h:83
double _alignThreshold
Definition: MyUserPrefsController.h:87
IBOutlet NSButton * _nextButton
Definition: MyImageListWindow.h:89
@ Analyzing
Definition: MyImageListWindow.h:39
id imageListItemWithURL:(NSURL *url)
Definition: MyImageListItem.m:197
NSCursor * _topRightCursor
Definition: MyImageView.h:56
Still image model class.
Definition: MyImageListItem.h:100
@ AnalyzeMode
Definition: MyImageListWindow.h:39
NSData * _result
Definition: MyListProcessing.h:72
BOOL lockSize()
Definition: MySizeLock.m:68
IBOutlet NSSlider * _deconvRadius
Definition: MyImageListWindow.h:108
NSLock * _refSpectrumLock
Definition: MyListProcessing.h:94
IBOutlet NSSlider * _zoomSlider
Definition: MyImageView.h:40
double _selectThreshold
Definition: MyDocumentData.h:77
MyIntegerPoint _analyzeSquareOrigin
Definition: MyObjectImageList.h:44
void setSearchSquareOrigin:(MyIntegerPoint origin)
Definition: MyImageListItem.m:167
IBOutlet NSButton * _minusButton
Definition: MyImageListWindow.h:87
NSSize imageSize()
Definition: MyImageView.m:306
#define FFT_PLAN_R2C
Definition: fourier.h:47
IBOutlet NSButton * _stackImageUpdatingButton
Definition: MyUserPrefsController.h:77
static const NSString * bottomLeftImage
Definition: MyImageViewSelection.m:38
ParalelOptimization_t analysisMultiProc()
Definition: MyUserPrefsController.m:217
#define K_SEARCH_ORIGIN_KEY
Definition: MyObjectImageList.m:27
#define FFT_FREE
Definition: fourier.h:50
Compatibility wrapper class for version 0 document format.
Definition: MyDocumentData.h:67
void outlineViewSelectionDidChange:(NSNotification *aNotification)
Definition: MyImageListWindow.m:292
IBOutlet NSTextField * _searchFieldY
Definition: MyImageListWindow.h:92
MyAnalysisMethod _method
Definition: MyListProcessing.h:151
@ AlignMode
Definition: MyImageListWindow.h:38
u_short _sideMenuLimit
Definition: MyImageListWindow.h:119
MyAnalysisMethod
Definition: MyListProcessing.h:142
MyPostProcessing * _postProcess
Processing helper class.
Definition: MyDocument.h:68
NSRect _bottomLeft
Definition: MyImageView.h:58
MySelectingMode
Definition: MyImageView.h:34
BOOL updateMinMaxQuality()
Definition: MyObjectImageList.m:386
MySelectingMode _selectMode
Definition: MyImageView.h:59
int getSelectionState()
Definition: MyImageListItem.m:125
MyIntegerSize size
Definition: LynkeosCommon.h:56
RGB * _flatField
Definition: MyListProcessing.h:70
int _listSize
Definition: MyImageListEnumerator.h:47
IBOutlet NSButton * _doubleButton
Definition: MyImageListWindow.h:105
static u_short adjustFFTside(u_short n)
Definition: MyImageListWindow.m:36
BOOL locked()
Definition: MySizeLock.m:57
#define greenValue(s, x, y)
Definition: fourier.h:79
int _itemIndex
Definition: MyImageListEnumerator.h:48
NSNumber * getIndex()
Definition: MyImageListItem.m:146
double getQuality()
Definition: MyImageListItem.m:144
static const NSPoint bottomLeftSpot
Definition: MyImageViewSelection.m:50
MyIntegerRect _selection
Definition: MyImageView.h:53
NSConnection * _cnx
Definition: MyDocument.m:50
static void processSpectrums(SPECTRUM result, SPECTRUM src, u_short width, u_short height, SPECTRUM dGauss, double threshold, SPECTRUM uGauss, double gain)
Definition: MyPostProcessing.m:128
#define K_STACK_TAB_IDENT
Definition: MyImageListWindow.m:33
double _dRadius
Definition: MyObjectImageList.h:52
double _uRadius
Definition: MyDocumentData.h:81
void fourier(FFT_DATA sample)
Definition: fourier.c:222
int ffmpegLoadMovie(const char *movieName, FfmpegMovie *resultMovie)
Definition: ffmpeg_access.c:218
#define NSMovie
Definition: LynkeosFfmpegMovie.h:4
u_short _factor
Definition: MyListProcessing.h:192
void FFT_DATA_INIT(FFT_DATA *d)
Definition: fourier.c:96
void setImage:offset:(NSImage *image,[offset] NSPoint offset)
Definition: MyImageView.m:184
#define K_ANALYZE_ORIGIN_KEY
Definition: MyObjectImageList.m:29
u_long _stackedImageNb
Definition: MyDocument.h:60
void correlate(FFT_DATA s1, FFT_DATA s2, FFT_DATA r)
Definition: corelation.c:93
NSRect _cropRectangle
Definition: MyDocumentData.h:78
@ ListMode
Definition: MyImageListWindow.h:37
int ffmpegNextFrame(FfmpegMovie *movie)
Definition: ffmpeg_access.c:45
double minQuality()
Definition: MyObjectImageList.m:207
#define K_SEARCH_ORIGIN_KEY
Definition: MyImageListItem.m:35
char * ffmpegLastErrorOccured()
Definition: ffmpeg_access.c:191
#define K_DOCUMENT_TYPE
Definition: MyDocument.m:38
double _qualityScale
Definition: MyImageListWindow.h:122
NSEnumerator * _threadImageList
Definition: MyDocument.h:72
NSSize imageSize()
Definition: LynkeosFfmpegMovie.m:52
void stopAllThreads()
Definition: MyDocument.m:147
#define K_PROCESS_TAB_IDENT
Definition: MyImageListWindow.m:34
NSRect _topRight
Definition: MyImageView.h:58
bool _stackMultiProc
Definition: MyUserPrefsController.h:95
FFT_DATA _deconvGauss
Definition: MyPostProcessing.h:42
int ffmpegResetMovieToStart(FfmpegMovie *movie)
u_short _analyzeSquareSide
Definition: MyObjectImageList.h:45
MyImageListWindowState _windowState
Definition: MyImageListWindow.h:117
void updateAlignControls()
Definition: MyImageListWindow.m:1071
void fourier(FFT_DATA sample)
Definition: fourier.c:222
IBOutlet NSButton * _plusButton
Definition: MyImageListWindow.h:86
NSCursor * _insideCursor
Definition: MyImageView.h:56
MyAnalysisMethod analysisMethod()
Definition: MyDocument.m:411
double _analyzeSquareSide
Definition: MyDocumentData.h:76
@ SelH
Definition: MyImageView.h:34
u_char nplanes
Definition: processing_core.h:68
static const NSPoint bottomRightSpot
Definition: MyImageViewSelection.m:51
IBOutlet id _delegate
Definition: MyImageView.h:42
MyIntegerPoint _searchSquareOrigin
Definition: MyImageListItem.h:58
MyIntegerPoint searchSquareOrigin()
Definition: MyObjectImageList.m:202
IBOutlet NSSlider * _whiteLevel
Definition: MyImageListWindow.h:110
static double quality(SPECTRUM spectrum, u_short width, u_short height, u_short down, u_short up)
Definition: MyListProcessing.m:202
BOOL _refSpectrumAvailable
Definition: MyListProcessing.h:102
#define K_PREF_ANALYSIS_IMAGE_UPDATING
Definition: MyUserPrefsController.h:44
IBOutlet NSTextField * _minQualityText
Definition: MyImageListWindow.h:102
REAL green
Definition: processing_core.h:54
#define K_PREF_STACK_MULTIPROC
Definition: MyUserPrefsController.h:47
IBOutlet NSTextField * _deconvTextThreshold
Definition: MyImageListWindow.h:111
#define K_INDEX_KEY
Definition: MyImageListItem.m:33
NSCursor * _bottomCursor
Definition: MyImageView.h:55
u_short _sizeFactor
Definition: MyObjectImageList.h:49
BOOL addItem:(MyImageListItem *item)
Definition: MyImageList.m:255
NSPoint _analyzeSquareOrigin
Definition: MyDocumentData.h:75
long _stack_sequence
Definition: MyDocument.h:63
#define FOR_DIRECT
Definition: fourier.h:35
Definition: LynkeosCommon.h:53
static const NSString * bottomRightImage
Definition: MyImageViewSelection.m:39
u_short _lowerCutoff
Definition: MyListProcessing.h:152
static const NSPoint leftSpot
Definition: MyImageViewSelection.m:44
NSRect _inside
Definition: MyImageView.h:58
#define min(a, b)
Definition: MyImageViewSelection.m:28
void loadImageDataIn:(NSMutableData *data)
Definition: LynkeosFfmpegMovie.m:82
MyImageListItem * firstItem()
Definition: MyImageList.m:184
bool isAligned()
Definition: MyImageListItem.m:133
FFT_DATA _alignSpectrum
Definition: MyDocument.h:74
void highlightItem:(MyImageListItem *item)
Definition: MyImageListWindow.m:250
Definition: MyListProcessing.h:219
TimeValue currentFrame
Definition: LynkeosFfmpegMovie.h:12
NSSize _imageSize
Definition: MyImageView.h:47
NSUserDefaults * _user
Definition: MyUserPrefsController.h:82
static const NSPoint crossSpot
Definition: MyImageViewSelection.m:43
IBOutlet NSPopUpButton * _alignMultiProcPopup
Definition: MyUserPrefsController.h:70
#define K_QUALITY_KEY
Definition: MyImageListItem.m:37
IBOutlet NSPopUpButton * _soundPopup
Definition: MyUserPrefsController.h:64
Definition: MyCustomViews.h:32
static const NSPoint insideSpot
Definition: MyImageViewSelection.m:52
void processItem:(MyImageListItem *item)
Definition: MyListProcessing.m:337
MyImageList * _flatFieldList
Definition: MyDocument.h:54
#define K_CUTOFF
Definition: MyPostProcessing.m:32
static const NSString * bottomImage
Definition: MyImageViewSelection.m:35
u_short _side
Definition: MyListProcessing.h:150
id _delegate
Definition: MyListProcessing.h:67
u_long _stackSize
Definition: MyImageList.h:52
NSMutableArray * _threads
Multithread control.
Definition: MyDocument.h:71
void SaveFrame(AVFrame *pFrame, int width, int height, int iFrame)
Definition: ffmpeg_access.c:151
#define GREEN_PLANE
Definition: fourier.h:72
MyImageListEnumerator * imageEnumerator()
Definition: MyImageList.m:207
MySizeLock * _sizeLock
Definition: MyDocument.h:59
static void getImageSample(MyImageListItem *item, RGB *dark, RGB *flat, MyIntegerRect rect, REAL *spectrum, RGB *pixels, short expand)
Definition: MyListProcessing.m:35
#define K_TIME_KEY
Definition: MyImageListItem.m:32
double _maxQuality
Definition: MyObjectImageList.h:46
int ffmpegErrorOccured()
Definition: ffmpeg_access.c:188
IBOutlet NSTabView * _tabPane
Definition: MyImageListWindow.h:82
void FFT_DATA_INIT(FFT_DATA *d)
Definition: fourier.c:96
bool _resizable
Definition: MyImageView.h:51
bool stackMultiProc()
Definition: MyUserPrefsController.m:221
id movieImageWithTime:parent:index:(TimeValue time,[parent] id up,[index] long index)
Definition: MyImageListItem.m:345
#define K_WHITE_LEVEL_KEY
Definition: MyImageList.m:29
CORRELATION_PEAK red
Definition: corelation.h:41
static MyIntegerSize MyMakeIntegerSize(u_short w, u_short h)
Definition: LynkeosCommon.h:66
TimeValue getNextFrameTime()
Definition: LynkeosFfmpegMovie.m:39
NSURL * getURL()
Definition: MyImageListItem.m:123
Wrapper class for version 1 document content.
Definition: MyDocumentData.h:45
BOOL invalidateLevels()
Definition: MyImageList.m:245
FfmpegMovie movie
Definition: LynkeosFfmpegMovie.h:11
IBOutlet NSTextField * _deconvTextRadius
Definition: MyImageListWindow.h:111
bool _adjustFFTSizes
Definition: MyUserPrefsController.h:85
int _count
Definition: MySizeLock.m:29
NSMutableArray * _sizeList
Definition: MySizeLock.h:40
int GetNextFrame(AVFormatContext *pFormatCtx, AVCodecContext *pCodecCtx, int videoStream, AVFrame *pFrame)
Definition: ffmpeg_access.c:78
MyIntegerPoint _referenceOrigin
Definition: MyListProcessing.h:98
bool _hasSearchSquare
Definition: MyImageListItem.h:57
short log_2(short val)
Definition: fourier.c:196
IBOutlet NSButton * _refCheckBox
Definition: MyImageListWindow.h:94
MyImageListWindowState
Definition: MyImageListWindow.h:35
void align()
Definition: MyDocument.m:668
int numberOfImages()
Definition: MyImageListItem.m:532
MyIntegerSize size()
Definition: MySizeLock.m:59
IBOutlet NSOutlineView * _textView
Definition: MyImageListWindow.h:81
The document window controler.
Definition: MyImageListWindow.h:75
BOOL validLevels()
Were levels set by the user ?
Definition: MyImageList.m:180
REAL _minLevel
Definition: MyDocument.h:64
MyImageListItem * _highlightedItem
Definition: MyImageListWindow.h:118
#define K_PREF_ALIGN_IMAGE_UPDATING
Definition: MyUserPrefsController.h:40
double maxQuality()
Definition: MyObjectImageList.m:208
BOOL _monochromeFlat
Definition: MyDocument.h:56
double _quality
Definition: MyImageListItem.h:61
MyImageListItem * referenceItem()
Definition: MyObjectImageList.m:201
NSArray * _itemList
Definition: MyImageListEnumerator.h:46
NSData * _rawStack
Definition: MyDocumentData.h:80
RGB * _rawStack
Definition: MyImageList.h:51
MyIntegerPoint origin
Definition: LynkeosCommon.h:55
IBOutlet NSPopUpButton * _searchSideMenu
Definition: MyImageListWindow.h:93
int saveTIFFPictureToFile(const char *fileName, char *buffer, unsigned int width, unsigned int height)
Definition: ffmpeg_access.c:334
id sizeLock()
Definition: MySizeLock.m:143
short x
Definition: LynkeosCommon.h:43
int ffmpegConvertCurrentFrame(FfmpegMovie *movie)
Definition: ffmpeg_access.c:59
NSCursor * _topCursor
Definition: MyImageView.h:55
int main(int argc, const char *argv[])
Definition: main.m:55
MyImageList * _currentList
Definition: MyImageListWindow.h:126
fftw_plan FFT_PLAN
Definition: processing_core.h:63
static const NSPoint topLeftSpot
Definition: MyImageViewSelection.m:48
fftw_complex COMPLEX
Definition: processing_core.h:62
int ffmpegInit()
Definition: ffmpeg_access.c:181
Threadable wrapper class for image list processing.
Definition: MyListProcessing.h:63
IBOutlet NSButton * _alignButton
Definition: MyImageListWindow.h:95
BOOL deleteItem:(MyImageListItem *item)
Definition: MyImageList.m:265
double _unsharpRadius
Definition: MyPostProcessing.h:43
static const NSPoint rightSpot
Definition: MyImageViewSelection.m:45
IBOutlet NSTextField * _unsharpTextRadius
Definition: MyImageListWindow.h:112
static const NSString * topLeftImage
Definition: MyImageViewSelection.m:36
double _deconvRadius
Definition: MyPostProcessing.h:43
MyImageListItem * _referenceItem
Definition: MyObjectImageList.h:40
Definition: MyListProcessing.m:263
NSCursor * _rightCursor
Definition: MyImageView.h:55
NSEnumerator * _list
Definition: MyListProcessing.h:68
@ FlatFieldMode
Definition: MyImageListWindow.h:47
@ StackMode
Definition: MyImageListWindow.h:40
void correlate_spectrums(FFT_DATA s1, FFT_DATA s2, FFT_DATA r)
Definition: corelation.c:45
int saveTIFFPictureToFile(const char *fileName, char *buffer, unsigned int width, unsigned int height)
Definition: ffmpeg_access.c:334
void allocate_spectrum(FFT_DATA *s, u_short w, u_short h, u_char nplanes, u_char goal)
Definition: fourier.c:147
#define K_LIST_TAB_IDENT
Definition: MyImageListWindow.m:30
void initializeProcessing()
Definition: fourier.c:45
static const MyIntegerPoint nowhere
Definition: MyImageListItem.m:39
NSRect _bottomRight
Definition: MyImageView.h:58
#define K_LIST_KEY
Definition: MyDocumentData.m:83
void invalidateStackedImage()
Definition: MyDocument.m:817
Concrete MyListProcessing dedicated to image quality.
Definition: MyListProcessing.h:148
int ffmpegConvertCurrentFrame(FfmpegMovie *movie)
Definition: ffmpeg_access.c:59
IBOutlet NSPanel * _panel
Definition: MyUserPrefsController.h:62
NSLock * _alignLock
Definition: MyDocument.h:73
Definition: MyDocument.m:47
IBOutlet NSTextField * _alignFrequencyCutoffText
Definition: MyUserPrefsController.h:66
IBOutlet NSTextField * _blackTextLevel
Definition: MyImageListWindow.h:113
static const NSString * rightImage
Definition: MyImageViewSelection.m:33
#define K_PREF_ADJUST_FFT_SIZES
Definition: MyUserPrefsController.h:37
REAL blue
Definition: processing_core.h:55
BOOL setStack:size:(RGB *stack,[size] u_long size)
Definition: MyImageList.m:224
#define FFT_MALLOC
Definition: fourier.h:46
Definition: MyObjectImageList.h:36
int videoStream
Definition: ffmpeg_access.h:12
#define K_OBJECT_LIST_KEY
Definition: MyDocumentData.m:29
Concrete MyListProcessing dedicated to image alignment.
Definition: MyListProcessing.h:91
static MyUserPrefsController * instancePointer
Definition: MyUserPrefsController.m:25
MyAnalysisMethod _analysisMethod
Definition: MyDocument.h:58
double _minQuality
Definition: MyImageListWindow.h:122
Definition: MyImageListWindowPrivate.h:28
FFT_PLAN direct
Definition: processing_core.h:72
double _zoom
Definition: MyImageView.h:49
Threadable classes for image list processing.
void correlate_spectrums(FFT_DATA s1, FFT_DATA s2, FFT_DATA r)
Definition: corelation.c:45
MyImageList * _flatFieldList
Definition: MyDocumentData.h:51
void setWindowState:(MyImageListWindowState state)
Definition: MyImageListWindow.m:192
void updateSidePopup()
Definition: MyImageListWindow.m:661
id getParent()
Definition: MyImageListItem.m:298
bool processMultiProc()
Definition: MyUserPrefsController.m:223
FFT_DATA _unsharpGauss
Definition: MyPostProcessing.h:42
void applyZoom:from:(double newZoom,[from] id sender)
Definition: MyImageView.m:42
bool stackImageUpdating()
Definition: MyUserPrefsController.m:219
NSArray * _imageList
Definition: MyDocumentData.h:71
void refreshOutline()
Definition: MyImageListWindow.m:245
NSBitmapImageRep * _stackedRep
Definition: MyDocument.h:62
short log_2(short val)
Definition: fourier.c:196
FFT_DATA _bufferSpectrum
Definition: MyListProcessing.h:154
@ SelNormal
Definition: MyImageView.h:34
static struct SwsContext * img_convert_ctx
Definition: ffmpeg_access.c:39
#define K_PREF_STACK_IMAGE_UPDATING
Definition: MyUserPrefsController.h:46
#define RED_PLANE
Definition: fourier.h:71
@ SelMove
Definition: MyImageView.h:34
double sigma_x
Definition: corelation.h:35
void updatePanel()
Definition: MyUserPrefsController.m:153
IBOutlet NSTextField * _maxQualityText
Definition: MyImageListWindow.h:102
io_connect_t _rootPort
Definition: MyDocument.h:79
bool _processMultiProc
Definition: MyUserPrefsController.h:96
static MyIntegerPoint MyMakeIntegerPoint(u_short x, u_short y)
Definition: LynkeosCommon.h:60
void updateStackControls()
Definition: MyImageListWindowPrivate.m:229
bool _processEnded
Definition: MyListProcessing.h:71
static void scalar_addition(RGB *result, RGB layer, double scalar)
Definition: stack.c:40
void initPrefsValue()
Definition: MyUserPrefsController.m:70
REAL _maxValue
Definition: MyPostProcessing.h:45
void unlockSize()
Definition: MySizeLock.m:81
double _dThreshold
Definition: MyDocumentData.h:82
double alignThreshold()
Definition: MyUserPrefsController.m:205
AVFrame * pConvertedFrame
Definition: ffmpeg_access.h:11
double _blackLevel
Definition: MyImageList.h:53
MyImageListItem * highlightedItem()
Definition: MyImageListWindow.m:189
double _whiteLevel
Definition: MyImageList.h:53
IBOutlet NSPopUpButton * _stackMultiProcPopup
Definition: MyUserPrefsController.h:78
MyImageListItem * _referenceItem
Definition: MyListProcessing.h:95
IBOutlet NSSlider * _alignThresholdSlider
Definition: MyUserPrefsController.h:67
NSString * _itemName
Definition: MyImageListItem.h:55
@ SpectrumAnalysis
Definition: MyListProcessing.h:145
TimeValue _time
Definition: MyImageListItem.h:117
bool adjustFFTSizes()
Definition: MyUserPrefsController.m:201
MyImageListItem * lastItem()
Definition: MyImageList.m:195
IBOutlet NSPopUpButton * _analyzeSideMenu
Definition: MyImageListWindow.h:98
NSImage * getImage()
Definition: MyImageListItem.m:148
IBOutlet NSSlider * _selectThresholdSlide
Definition: MyImageListWindow.h:101
NSCursor * _bottomRightCursor
Definition: MyImageView.h:56
void stack()
Definition: MyDocument.m:778
double _blackLevel
Definition: MyDocumentData.h:83
IBOutlet NSButton * _analysisImageUpdatingButton
Definition: MyUserPrefsController.h:75
NSMutableArray * imageArray()
Definition: MyImageList.m:174
int _movieSize
Definition: MyImageListEnumerator.h:50
void stack_layer(RGB *result, RGB *layer, double dx, double dy, short w, short h)
Definition: stack.c:47
id imageListWithArray:(NSArray *list)
Definition: MyImageList.m:155
MyImageListEnumerator * imageEnumeratorStartAt:directSense:(id item,[directSense] BOOL direct)
Definition: MyImageList.m:213
bool _processImageUpdate
Definition: MyImageListWindow.h:120
IBOutlet NSTextField * _analyzeFieldY
Definition: MyImageListWindow.h:97
IBOutlet NSPopUpButton * _processMultiProcPopup
Definition: MyUserPrefsController.h:79
void free_spectrum(FFT_DATA *s)
Definition: fourier.c:116
double uRadius()
Definition: MyObjectImageList.m:216
#define K_CURSRECT_SIZE
Definition: MyImageViewSelection.m:25
static void cutoffSpectrum(SPECTRUM spectrum, u_short width, u_short height, u_short cutoff)
Definition: MyListProcessing.m:175
BOOL _doubleSize
Definition: MyDocumentData.h:79
void addFiles:(NSArray *files)
Definition: MyImageListWindow.m:1020
FFT_DATA * _referenceSpectrum
Definition: MyListProcessing.h:96
#define FFT_DESTROY_PLAN
Definition: fourier.h:51
IBOutlet NSTextField * _whiteTextLevel
Definition: MyImageListWindow.h:113
MyIntegerRect cropRectangle()
Definition: MyObjectImageList.m:211
#define K_CROP_RECTANGLE_KEY
Definition: MyObjectImageList.m:32
BOOL monochromeFlat()
Definition: MyDocument.m:409
FFT_DATA _bufferSpectrum
Definition: MyListProcessing.h:97
REAL minLevel()
Definition: MyDocument.m:414
void processList()
Definition: MyListProcessing.m:299
NSImageRep * _imageRep
Definition: MyImageView.h:46
REAL maxLevel()
Definition: MyDocument.m:415
double _dThreshold
Definition: MyObjectImageList.h:52
void stack_layer(RGB *result, RGB *layer, double dx, double dy, short w, short h)
Definition: stack.c:47
MyImageListItem * _referenceItem
Definition: MyDocumentData.h:72
void normalize_rgb(RGB *rgb, u_long length, double scale, BOOL mono)
Multiply the pixels by a scalar.
Definition: MyListProcessing.m:711
@ Stacking
Definition: MyImageListWindow.h:40
bool _analysisImageUpdating
Definition: MyUserPrefsController.h:92
RGB * _rgbBuffer
Definition: MyListProcessing.h:191
short y
Definition: LynkeosCommon.h:44
struct FfmpegMovie FfmpegMovie
IBOutlet NSPopUpButton * _listMenu
Definition: MyImageListWindow.h:84
#define max(a, b)
Definition: MyImageViewSelection.m:27
#define K_ALIGN_OFFSET_KEY
Definition: MyImageListItem.m:36
NSString * windowFrame()
Definition: MyDocument.m:416
MyIntegerRect _cropRectangle
Definition: MyObjectImageList.h:50
Definition: MyImageView.h:36
void readPrefs()
Definition: MyUserPrefsController.m:87
NSRect _bottom
Definition: MyImageView.h:57
#define K_PREF_PROCESS_MULTIPROC
Definition: MyUserPrefsController.h:48
#define K_EXPORT_MOVIE_TAG
Definition: MyDocument.m:41
void setAlignOffset:(NSPoint offset)
Definition: MyImageListItem.m:178
IBOutlet NSButton * _stackButton
Definition: MyImageListWindow.h:106
static const NSString * topImage
Definition: MyImageViewSelection.m:34
double _dRadius
Definition: MyDocumentData.h:82
NSArray * movieUnfilteredFileTypes()
Definition: LynkeosFfmpegMovie.m:9
FFT_PLAN inverse
Definition: processing_core.h:72
Definition: LynkeosFfmpegMovie.h:10
u_short _searchSquareSide
Definition: MyObjectImageList.h:42
void setSelection:resizable:(MyIntegerRect selection,[resizable] bool resize)
Definition: MyImageViewSelection.m:160
static const NSPoint topRightSpot
Definition: MyImageViewSelection.m:49
MyImageListWindowMode _windowMode
Definition: MyImageListWindow.h:116
int _step
Definition: MyImageListEnumerator.h:52
long _spectrum_sequence
Definition: MyPostProcessing.h:40
bool _stackImageUpdating
Definition: MyUserPrefsController.h:94
double REAL
Definition: processing_core.h:48
static int _ffmpegErrorOccuredFlag
Definition: ffmpeg_access.c:37
static void adjustFFTrect(MyIntegerRect *r)
Definition: MyImageListWindow.m:73
#define K_SAVE_IMAGE_TAG
Definition: MyDocument.m:40
static void prepareImageSpectrum(FFT_DATA s, RGB *src, REAL *minv, REAL *maxv)
Definition: MyPostProcessing.m:34
u_short analyzeSquareSide()
Definition: MyObjectImageList.m:206
void invalidateSearchSquare()
Definition: MyImageListItem.m:162
double _uGain
Definition: MyDocumentData.h:81
Document contents wrapper classes.
NSString * _windowFrame
Definition: MyDocument.h:65
REAL minValue()
Definition: MyPostProcessing.m:203
static short range(short i, short l)
Definition: stack.c:29
Definition: LynkeosCommon.h:47
@ NoParallelOptimization
Definition: MyUserPrefsController.h:53
void highlightOther:(BOOL direct)
Definition: MyImageListWindowPrivate.m:58
MySizeCount * sizeCountWithSize:(MyIntegerSize size)
Definition: MySizeLock.m:48
@ ListThreadsOptimizations
Definition: MyUserPrefsController.h:55
NSString * _windowFrame
Definition: MyDocumentData.h:54
MyIntegerPoint _selectionOrigin
Definition: MyImageView.h:52
NSCursor * _topLeftCursor
Definition: MyImageView.h:55
REAL _minValue
Definition: MyPostProcessing.h:45
ParalelOptimization_t alignMultiProc()
Definition: MyUserPrefsController.m:209
void fourier_inverse(FFT_DATA sample, REAL *vmin, REAL *vmax)
Definition: fourier.c:242
double _uGain
Definition: MyObjectImageList.h:53
u_short w
Definition: processing_core.h:69
MyImageListWindowState windowState()
Definition: MyImageListWindow.m:187
int bool
Definition: ffmpeg_access.c:33
double sigma_y
Definition: corelation.h:36
MyImageListWindowMode windowMode()
Definition: MyImageListWindow.m:185
@ SelNone
Definition: MyImageView.h:34
void setParent:(id parent)
Definition: MyImageListItem.m:323
MyMovie * _currentMovie
Definition: MyImageListEnumerator.h:49
static MyIntegerRect MyMakeIntegerRect(u_short x, u_short y, u_short w, u_short h)
Definition: LynkeosCommon.h:72
static double entropy(REAL *image, u_short width, u_short height)
Definition: MyListProcessing.m:232
IBOutlet NSTextField * _analysisLowerCutoffText
Definition: MyUserPrefsController.h:72
int ffmpegErrorOccured()
Definition: ffmpeg_access.c:188
NSImage * stackedImage()
Definition: MyDocument.m:413
double x
Definition: corelation.h:32
void * rgbPlane(FFT_DATA sample, u_char c)
Definition: fourier.c:278
static void MySleepCallBack(void *x, io_service_t y, natural_t messageType, void *messageArgument)
Definition: MyDocument.m:69
static void makeGaussianSpectrum(FFT_DATA buffer, double r)
Definition: MyPostProcessing.m:87
static const NSString * insideImage
Definition: MyImageViewSelection.m:40
Definition: ffmpeg_access.h:7
NSRecursiveLock * _lock
Definition: MyImageListEnumerator.h:53
IBOutlet NSButton * _monoStackButton
Definition: MyImageListWindow.h:105
NSPoint _offset
Definition: MyImageView.h:45
NSMutableArray * _list
Definition: MyImageList.h:49
MyImageList * _darkFrameList
Definition: MyDocument.h:53
id initWithArray:(NSArray *list)
Definition: MyImageList.m:147
double dThreshold()
Definition: MyObjectImageList.m:215
TimeValue getTime()
Definition: MyImageListItem.m:291
REAL maxValue()
Definition: MyPostProcessing.m:204
double alignFrequencyCutoff()
Definition: MyUserPrefsController.m:203
#define FOR_INVERSE
Definition: fourier.h:36
void imageSelectionChanged()
Definition: MyImageListItem.m:618
void setQuality:(double quality)
Definition: MyImageListItem.m:184
MyIntegerRect _cropRectangle
Definition: MyListProcessing.h:66
Definition: MySizeLock.h:36
MyObjectImageList * _imageList
Definition: MyDocumentData.h:49
void invalidateAlignment()
Definition: MyImageListItem.m:173
MyIntegerSize lockedSize()
Definition: MyDocument.m:412
#define K_PREF_ANALYSIS_MULTIPROC
Definition: MyUserPrefsController.h:45
u_short _side
Definition: MyListProcessing.h:99
void updateProcessControls()
Definition: MyImageListWindowPrivate.m:293
Definition: MyPostProcessing.h:35
NSString * windowModeName()
Definition: MyImageListWindowPrivate.m:46
IBOutlet NSPopUpButton * _analyzeMethodMenu
Definition: MyImageListWindow.h:100
REAL * colorValue(FFT_DATA sample, u_short x, u_short y, u_char c)
Definition: fourier.c:283
NSCursor * _bottomLeftCursor
Definition: MyImageView.h:56
u_short pw
Definition: processing_core.h:69
fftw_complex * SPECTRUM
Definition: processing_core.h:62
AVCodecContext * pCodecCtx
Definition: ffmpeg_access.h:9
NSURL * _itemURL
Definition: MyImageListItem.h:54
Definition: MyUserPrefsController.m:27
u_short width
Definition: LynkeosCommon.h:49
void correlate(FFT_DATA s1, FFT_DATA s2, FFT_DATA r)
Definition: corelation.c:93
MyUserPrefsController * getUserPref()
Definition: MyUserPrefsController.m:197
NSRect _top
Definition: MyImageView.h:57
Definition: MySizeLock.m:25
double analysisUpperCutoff()
Definition: MyUserPrefsController.m:213
Definition: LynkeosCommon.h:41
MyIntegerPoint _lastPoint
Definition: MyImageView.h:52
int ffmpegInit()
Definition: ffmpeg_access.c:181
IBOutlet NSButton * _alignImageUpdatingButton
Definition: MyUserPrefsController.h:69
#define K_URL_KEY
Definition: MyImageListItem.m:30
REAL red
Definition: processing_core.h:53
void corelation_peak(FFT_DATA result, CORRELATION_PEAK *peak)
Definition: corelation.c:117
Common class for all image list items.
Definition: MyImageListItem.h:50
double _searchSquareSide
Definition: MyDocumentData.h:74
double dRadius()
Definition: MyObjectImageList.m:214
#define K_IMAGES_KEY
Definition: MyImageListItem.m:34
MyObjectImageList * imageList()
Images to be processed.
Definition: MyDocument.m:406
MyImageList * flatFieldList()
Optical attenuations.
Definition: MyDocument.m:408
FFT_DATA _result
Definition: MyPostProcessing.h:41
Definition: MyImageView.h:72
u_short numberOfCpus
Definition: fourier.c:39
void allocate_spectrum(FFT_DATA *s, u_short w, u_short h, u_char nplanes, u_char goal)
Definition: fourier.c:147
void * ppmData
Definition: ffmpeg_access.h:13
oneway void stopProcessing()
Definition: MyListProcessing.m:389
void removeSize:(MyIntegerSize size)
Definition: MySizeLock.m:113
IBOutlet NSTextField * _cropX
Definition: MyImageListWindow.h:104
AVFormatContext * pFormatCtx
Definition: ffmpeg_access.h:8
NSPoint _alignOffset
Definition: MyImageListItem.h:60
MyImageListWindow * _myWindow
Window controller.
Definition: MyDocument.h:83
IBOutlet NSButton * _adjustFFTSizesButton
Definition: MyUserPrefsController.h:63
void fourier_inverse(FFT_DATA sample, REAL *vmin, REAL *vmax)
Definition: fourier.c:242
void ffmpegSetLastErrorOccured(char *msg, int errorCode)
Definition: ffmpeg_access.c:176
Definition: MyImageView.m:35
u_short _width
Definition: MyPostProcessing.h:44
double _uRadius
Definition: MyObjectImageList.h:53
NSString * getName()
Definition: MyImageListItem.m:127
void updateSelectThresholdSlide()
Definition: MyImageListWindowPrivate.m:201
static short processDrag(long mouse, u_short origin, u_short maximum, bool upright)
Definition: MyImageViewSelection.m:55
MyImageList * _darkFrameList
Definition: MyDocumentData.h:50
u_short numberOfCpus
Definition: fourier.c:39
MyImageList * currentList()
Definition: MyDocument.m:100
u_short searchSquareSide()
Definition: MyObjectImageList.m:203
@ ImageMode
Definition: MyImageListWindow.h:48
double qualityThreshold()
Definition: MyObjectImageList.m:209
double y
Definition: corelation.h:33
#define K_BLACK_LEVEL_KEY
Definition: MyImageList.m:28
IBOutlet NSTextField * _analysisUpperCutoffText
Definition: MyUserPrefsController.h:74
#define BLUE_PLANE
Definition: fourier.h:73
void resetMovie()
Definition: LynkeosFfmpegMovie.m:58
IBOutlet NSButton * _analyzeButton
Definition: MyImageListWindow.h:99
void * rgbPlane(FFT_DATA sample, u_char c)
Definition: fourier.c:278
NSMovie * getMovie()
Definition: MyImageListItem.m:514
void initCursorRectangles()
Definition: MyImageViewSelection.m:82
u_short _upperCutoff
Definition: MyListProcessing.h:153
bool _aligned
Definition: MyImageListItem.h:59
#define blueValue(s, x, y)
Definition: fourier.h:80
ParalelOptimization_t _analysisMultiProc
Definition: MyUserPrefsController.h:93
IBOutlet NSPopUpButton * _analysisMultiProcPopup
Definition: MyUserPrefsController.h:76
double _selectThreshold
Definition: MyObjectImageList.h:47
SPECTRUM spectrum
Definition: processing_core.h:70
@ SelV
Definition: MyImageView.h:34
double _whiteLevel
Definition: MyDocumentData.h:83
bool _fillSideArmed
Definition: MyImageListWindow.h:121
bool hasSearchSquare()
Definition: MyImageListItem.m:129
void initializeProcessing()
Definition: fourier.c:45
static u_short scale(REAL v, REAL vmin, REAL factor)
Definition: MyPostProcessing.m:72
void ffmpegMovieBackToStart(FfmpegMovie *movie)
Definition: ffmpeg_access.c:197
#define K_LIST_KEY
Definition: MyImageList.m:25
Definition: corelation.h:39
IBOutlet NSTextField * _zoomField
Definition: MyImageView.h:41
Definition: MyUserPrefsController.h:58
double analysisLowerCutoff()
Definition: MyUserPrefsController.m:211
IBOutlet NSTextField * _unsharpTextGain
Definition: MyImageListWindow.h:112
#define FFT_EXECUTE
Definition: fourier.h:49