ROPO
Loading...
Searching...
No Matches
rave_ropo_generator.c File Reference
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <fmi_util.h>
#include <fmi_image.h>
#include <fmi_image_filter.h>
#include <fmi_image_filter_line.h>
#include <fmi_image_histogram.h>
#include <fmi_image_filter_speck.h>
#include <fmi_image_filter_morpho.h>
#include <fmi_image_restore.h>
#include <fmi_meteosat.h>
#include <fmi_radar_image.h>
#include "rave_ropo_generator.h"
#include "rave_debug.h"
#include "rave_alloc.h"
#include "raveobject_list.h"
Include dependency graph for rave_ropo_generator.c:

Go to the source code of this file.

Classes

struct  _RaveRopoGenerator_t
 
struct  RopoGenerator_PgmCodeMapping
 

Functions

void RaveRopoGenerator_setImage (RaveRopoGenerator_t *self, RaveFmiImage_t *image)
 
RaveFmiImage_tRaveRopoGenerator_getImage (RaveRopoGenerator_t *self)
 
void RaveRopoGenerator_threshold (RaveRopoGenerator_t *self, int threshold)
 
int RaveRopoGenerator_speck (RaveRopoGenerator_t *self, int minDbz, int maxA)
 
int RaveRopoGenerator_speckNormOld (RaveRopoGenerator_t *self, int minDbz, int maxA, int maxN)
 
int RaveRopoGenerator_emitter (RaveRopoGenerator_t *self, int minDbz, int length)
 
int RaveRopoGenerator_emitter2 (RaveRopoGenerator_t *self, int minDbz, int length, int width)
 
int RaveRopoGenerator_clutter (RaveRopoGenerator_t *self, int minDbz, int maxCompactness)
 
int RaveRopoGenerator_clutter2 (RaveRopoGenerator_t *self, int minDbz, int maxSmoothness)
 
int RaveRopoGenerator_softcut (RaveRopoGenerator_t *self, int maxDbz, int r, int r2)
 
int RaveRopoGenerator_biomet (RaveRopoGenerator_t *self, int maxDbz, int dbzDelta, int maxAlt, int altDelta)
 
int RaveRopoGenerator_ship (RaveRopoGenerator_t *self, int minRelDbz, int minA)
 
int RaveRopoGenerator_sun (RaveRopoGenerator_t *self, int minDbz, int minLength, int maxThickness)
 
int RaveRopoGenerator_sun2 (RaveRopoGenerator_t *self, int minDbz, int minLength, int maxThickness, int azimuth, int elevation)
 
int RaveRopoGenerator_classify (RaveRopoGenerator_t *self)
 
void RaveRopoGenerator_declassify (RaveRopoGenerator_t *self)
 
RaveFmiImage_tRaveRopoGenerator_restore (RaveRopoGenerator_t *self, int threshold)
 
RaveFmiImage_tRaveRopoGenerator_restore2 (RaveRopoGenerator_t *self, int threshold)
 
int RaveRopoGenerator_restoreSelf (RaveRopoGenerator_t *self, int threshold)
 
int RaveRopoGenerator_getProbabilityFieldCount (RaveRopoGenerator_t *self)
 
RaveFmiImage_tRaveRopoGenerator_getProbabilityField (RaveRopoGenerator_t *self, int index)
 
RaveFmiImage_tRaveRopoGenerator_getClassification (RaveRopoGenerator_t *self)
 
RaveFmiImage_tRaveRopoGenerator_getMarkers (RaveRopoGenerator_t *self)
 
RaveRopoGenerator_tRaveRopoGenerator_new (RaveFmiImage_t *image)
 

Variables

RaveCoreObjectType RaveRopoGenerator_TYPE
 

Detailed Description

rave object wrapper for the ropo generator This object DOES NOT support #RAVE_OBJECT_CLONE.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2011-09-02

Definition in file rave_ropo_generator.c.

Function Documentation

◆ RaveRopoGenerator_biomet()

int RaveRopoGenerator_biomet ( RaveRopoGenerator_t * self,
int maxDbz,
int dbzDelta,
int maxAlt,
int altDelta )

Remove insect band. Example: -10dbz 5dBZ 5000m 1km <dbz_max> <dbz_delta> <alt_max> <alt_delta>

Parameters
[in]self- self
[in]maxDbz- max dbz
[in]dbzDelta- relative dbz
[in]maxAlt- max altitude
[in]altDelta- altitude delta
Returns
1 on success otherwise 0

Definition at line 708 of file rave_ropo_generator.c.

◆ RaveRopoGenerator_classify()

int RaveRopoGenerator_classify ( RaveRopoGenerator_t * self)

Updates the classifications with the currently kept probability fields

Parameters
[in]self- self
Returns
1 on success otherwise 0

Definition at line 838 of file rave_ropo_generator.c.

◆ RaveRopoGenerator_clutter()

int RaveRopoGenerator_clutter ( RaveRopoGenerator_t * self,
int minDbz,
int maxCompactness )

Remove specks under incompactness A Example: -5 5

Parameters
[in]self- self
[in]minDbz- min dbz
[in]maxCompactness- the max compactness A
Returns
1 on success otherwise 0

Definition at line 609 of file rave_ropo_generator.c.

◆ RaveRopoGenerator_clutter2()

int RaveRopoGenerator_clutter2 ( RaveRopoGenerator_t * self,
int minDbz,
int maxSmoothness )

Remove specks under smoothness Example: -5 60

Parameters
[in]self- self
[in]minDbz- min dbz
[in]maxSmoothness- the max smoothness
Returns
1 on success otherwise 0

Definition at line 643 of file rave_ropo_generator.c.

◆ RaveRopoGenerator_declassify()

void RaveRopoGenerator_declassify ( RaveRopoGenerator_t * self)

Clears all classfication information by removing all probabilities, master classification and marker fields. This is basically the same as running RaveRopoGenerator_setImage with the image returned from RaveRopoGenerator_getImage.

Parameters
[in]self- self

Definition at line 931 of file rave_ropo_generator.c.

◆ RaveRopoGenerator_emitter()

int RaveRopoGenerator_emitter ( RaveRopoGenerator_t * self,
int minDbz,
int length )

Filter unity-width emitter lines. Example: -10dbz 4

Parameters
[in]self- self
[in]minDbz- min dbz
[in]length- length
Returns
1 on success otherwise 0

Definition at line 547 of file rave_ropo_generator.c.

◆ RaveRopoGenerator_emitter2()

int RaveRopoGenerator_emitter2 ( RaveRopoGenerator_t * self,
int minDbz,
int length,
int width )

Filter emitter lines. Example: -10dbz, 4 bins, 2

Parameters
[in]self- self
[in]minDbz- min dbz
[in]length- the bin length
[in]width- the width
Returns
1 on success otherwise 0

Definition at line 577 of file rave_ropo_generator.c.

◆ RaveRopoGenerator_getClassification()

RaveFmiImage_t * RaveRopoGenerator_getClassification ( RaveRopoGenerator_t * self)

Returns the a classification probability field.

Parameters
[in]self- self
Returns
the classification field that is determined from all run detectors.

Definition at line 1054 of file rave_ropo_generator.c.

◆ RaveRopoGenerator_getImage()

RaveFmiImage_t * RaveRopoGenerator_getImage ( RaveRopoGenerator_t * self)

Returns the fmi image associated with this generator

Parameters
[in]self- self
Returns
the fmi image

Definition at line 458 of file rave_ropo_generator.c.

◆ RaveRopoGenerator_getMarkers()

RaveFmiImage_t * RaveRopoGenerator_getMarkers ( RaveRopoGenerator_t * self)

Returns the a field containing information what detector has contributed to the probability field.

Parameters
[in]self- self
Returns
the markers field

Definition at line 1063 of file rave_ropo_generator.c.

◆ RaveRopoGenerator_getProbabilityField()

RaveFmiImage_t * RaveRopoGenerator_getProbabilityField ( RaveRopoGenerator_t * self,
int index )

Returns the probability field at the specified index.

Parameters
[in]self- self
[in]index- the index of the field
Returns
the probability field on success otherwise NULL

Definition at line 1043 of file rave_ropo_generator.c.

◆ RaveRopoGenerator_getProbabilityFieldCount()

int RaveRopoGenerator_getProbabilityFieldCount ( RaveRopoGenerator_t * self)

Returns the number of run detectors.

Parameters
[in]self- self
Returns
the number of run detectors

Definition at line 1037 of file rave_ropo_generator.c.

◆ RaveRopoGenerator_new()

RaveRopoGenerator_t * RaveRopoGenerator_new ( RaveFmiImage_t * image)

Creates a ropo generator with the provided fmi image.

Parameters
[in]image- the image this generator should work on
Returns
a ropo generator on success otherwise NULL

Definition at line 1072 of file rave_ropo_generator.c.

◆ RaveRopoGenerator_restore()

RaveFmiImage_t * RaveRopoGenerator_restore ( RaveRopoGenerator_t * self,
int threshold )

Creates a restored image according to the classification table.

Parameters
[in]self- self
[in]threshold- the probability threshold
Returns
the restored image.

Classification should always be UCHAR

Definition at line 939 of file rave_ropo_generator.c.

◆ RaveRopoGenerator_restore2()

RaveFmiImage_t * RaveRopoGenerator_restore2 ( RaveRopoGenerator_t * self,
int threshold )

Creates a restored image according to the classification table, filling in holes.

Parameters
[in]self- self
[in]threshold- the probability threshold
Returns
the restored image.

Classification should always be UCHAR

Definition at line 977 of file rave_ropo_generator.c.

◆ RaveRopoGenerator_restoreSelf()

int RaveRopoGenerator_restoreSelf ( RaveRopoGenerator_t * self,
int threshold )

Restores self. Basically the same as RaveRopoGenerator_restore followed by a RaveRopoGenerator_setImage but the probability fields aren't removed.

Parameters
[in]self- self
[in]threshold- the probability threshold
Returns
1 on success otherwise 0

Definition at line 1014 of file rave_ropo_generator.c.

◆ RaveRopoGenerator_setImage()

void RaveRopoGenerator_setImage ( RaveRopoGenerator_t * self,
RaveFmiImage_t * image )

Sets the rave fmi image to use during this generation. This will clear all previous calculations.

Parameters
[in]self- self
[in]image- the image to perform operations on

Definition at line 448 of file rave_ropo_generator.c.

◆ RaveRopoGenerator_ship()

int RaveRopoGenerator_ship ( RaveRopoGenerator_t * self,
int minRelDbz,
int minA )

Remove ships. Example: 50 20

Parameters
[in]self- self
[in]minRelDbz- min relative DBZ
[in]minA- min A
Returns
1 on success otherwise 0

Definition at line 741 of file rave_ropo_generator.c.

◆ RaveRopoGenerator_softcut()

int RaveRopoGenerator_softcut ( RaveRopoGenerator_t * self,
int maxDbz,
int r,
int r2 )

Remove insect band. Example: -10dbz 250km 100km

Parameters
[in]self- self
[in]maxDbz- max dbz
[in]r- r
[in]r2- r2
Returns
1 on success otherwise 0

Definition at line 677 of file rave_ropo_generator.c.

◆ RaveRopoGenerator_speck()

int RaveRopoGenerator_speck ( RaveRopoGenerator_t * self,
int minDbz,
int maxA )

Threshold by min dBz, detect specks < A Example: -20dBz 5pix

Parameters
[in]self- self
[in]minDbz- min dbz
[in]maxA- max A
Returns
1 on success otherwise 0

Definition at line 478 of file rave_ropo_generator.c.

◆ RaveRopoGenerator_speckNormOld()

int RaveRopoGenerator_speckNormOld ( RaveRopoGenerator_t * self,
int minDbz,
int maxA,
int maxN )

Threshold by min dBz, then detect specks, size A_max_range <=> size N*A A. Example: -20dBz 5pix 16

Parameters
[in]self- self
[in]minDbz- min dbz
[in]maxA- max A
[in]maxN- max N
Returns
1 on success otherwise 0

Definition at line 512 of file rave_ropo_generator.c.

◆ RaveRopoGenerator_sun()

int RaveRopoGenerator_sun ( RaveRopoGenerator_t * self,
int minDbz,
int minLength,
int maxThickness )

Remove sun. Example: -20dbz 100bins 3

Parameters
[in]self- self
[in]minDbz- min dbz
[in]minLength- min length
[in]maxThickness- max thickness
Returns
1 on success otherwise 0

Definition at line 772 of file rave_ropo_generator.c.

◆ RaveRopoGenerator_sun2()

int RaveRopoGenerator_sun2 ( RaveRopoGenerator_t * self,
int minDbz,
int minLength,
int maxThickness,
int azimuth,
int elevation )

Remove sun. Example: -20dBZ 100bins 3 45 2

Parameters
[in]self- self
[in]minDbz- min dbz
[in]minLength- min length
[in]maxThickness- max thickness
[in]azimuth- the azimuth
[in]elevation- the elevation
Returns
1 on success otherwise 0

Definition at line 804 of file rave_ropo_generator.c.

◆ RaveRopoGenerator_threshold()

void RaveRopoGenerator_threshold ( RaveRopoGenerator_t * self,
int threshold )

This will force a thresholding on the image. This will affect the image it self and is not recoverable.

Parameters
[in]self- self
[in]threshold- the threshold value
Returns
N/A

Definition at line 464 of file rave_ropo_generator.c.

Variable Documentation

◆ RaveRopoGenerator_TYPE

RaveCoreObjectType RaveRopoGenerator_TYPE
Initial value:
= {
"RaveRopoGenerator",
RaveRopoGenerator_constructor,
RaveRopoGenerator_destructor,
NULL
}
struct _RaveRopoGenerator_t RaveRopoGenerator_t

Type definition to use when creating a rave object.

Definition at line 1089 of file rave_ropo_generator.c.