Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
eyes:logics:sql [2017/06/12 16:20] gbunzel created |
eyes:logics:sql [2017/06/12 18:31] (current) jschlie1 |
||
---|---|---|---|
Line 7: | Line 7: | ||
===== Example ==== | ===== Example ==== | ||
- | *reproduce the input (default value) | + | *Reproduce the input (default value) |
''SELECT *, FROM t0'' | ''SELECT *, FROM t0'' | ||
- | *rename | + | *Rename |
'' SELECT *,classID as clusterMember FROM t0'' | '' SELECT *,classID as clusterMember FROM t0'' | ||
- | *perfom arithmetic on certain header value | + | *Perfom arithmetic on certain header value |
'' SELECT *, (referenceData -120) as referenceData FROM t0 '' | '' SELECT *, (referenceData -120) as referenceData FROM t0 '' | ||
- | *count distinct values, example given by //referanceData// from alignment. t0 := projections, t1 := ali images | + | *Count distinct values, example given by //referanceData// from alignment. t0 := projections, t1 := ali images |
'' SELECT DISTINCT t0.*, COUNT(t1.referenceData) as counter FROM t0, t1 WHERE t1.referenceData == t0.imageID GROUP BY t1.referenceData '' | '' SELECT DISTINCT t0.*, COUNT(t1.referenceData) as counter FROM t0, t1 WHERE t1.referenceData == t0.imageID GROUP BY t1.referenceData '' | ||
- | *select only even images (repleace =0 with =1 for odd images) | + | *Select only even images (repleace =0 with =1 for odd images) |
'' SELECT * FROM t0 where img%2=0 '' | '' SELECT * FROM t0 where img%2=0 '' | ||
- | *calculate the average of parameter //imageID// for a given condition (where clause) | + | *Calculate the average of parameter //imageID// for a given condition (where clause) |
'' SELECT sum(imageID)/count(imageID) as sum FROM t0 where imageID >10 and imageID < 20 '' | '' SELECT sum(imageID)/count(imageID) as sum FROM t0 where imageID >10 and imageID < 20 '' | ||
| | ||
- | *count the number of distinct values for the header key //croppedFromFile// and order the output by that key, output will consist of 1 image per unique value | + | *Count the number of distinct values for the header key //croppedFromFile// and order the output by that key, output will consist of 1 image per unique value |
'' SELECT *, COUNT(croppedFromFile) FROM t0 GROUP BY croppedFromFile '' | '' SELECT *, COUNT(croppedFromFile) FROM t0 GROUP BY croppedFromFile '' | ||
Line 38: | Line 38: | ||
'' SELECT * FROM t0 WHERE eulerBeta = 130 AND eulerGamma BETWEEN 190 AND 195 '' | '' SELECT * FROM t0 WHERE eulerBeta = 130 AND eulerGamma BETWEEN 190 AND 195 '' | ||
- | *mirror the euler angles of particles (for angular distribution plot with //eulerBeta// and //eulerGamma// in Value Viewer) | + | *Mirror the euler angles of particles (for angular distribution plot with //eulerBeta// and //eulerGamma// in Value Viewer) |
'' SELECT *, (180-eulerBeta) AS eulerBeta, | '' SELECT *, (180-eulerBeta) AS eulerBeta, | ||
CASE | CASE | ||
Line 46: | Line 46: | ||
AS eulerGamma FROM t0 '' | AS eulerGamma FROM t0 '' | ||
- | ===== Modes/Processes ===== | + | ===== Parameters and I/O ===== |
- | ==== thisIsTheNameOfMode1 ==== | + | |
- | Here, a short introduction for the given mode should be placed. Again, state WHAT and WHY this mode us useful in not more than 2 sentences. | + | |
|< 100% 30% >| | |< 100% 30% >| | ||
^ Parameters ^ Description ^ | ^ Parameters ^ Description ^ | ||
- | | Some changeable parameter | Description of this parameter | | + | | Statement | This is the actual SQL statement used to filter the input(s) | |
- | | -> and its sub-parameter | more description | | + | | Write 1D images | Writes a 1D image for every header key. Every value in the output image is the header value of one particular image of the input dataset. | |
- | | Next main parameter | and more more more | | + | |
- | | -> and its sub-parameter | ... descriptions | | + | |
|< 100% 30% >| | |< 100% 30% >| | ||
^ Input ^ Description ^ | ^ Input ^ Description ^ | ||
- | | FirstInput | Input Description 1 | | + | | //Input table t0// | Stack of input images | |
- | | SecondInput | Input Description 2 | | + | | //Input table t1// | Stack of input images | |
- | | //ThirdInput// | Input Description 3: Optional Input in Italic | | + | |
|< 100% 30% >| | |< 100% 30% >| | ||
^ Output ^ Description ^ | ^ Output ^ Description ^ | ||
- | | FirstOutput | Output Description | | + | | Output result| Stack of output images | |
|< 100% 30% >| | |< 100% 30% >| | ||
^ New/Changed Header Values ^ Description ^ | ^ New/Changed Header Values ^ Description ^ | ||
- | | headerValue1 | what does it say? how is it changed? | | + | New or changed header values depend on how this logic is used, since header values can be added or modified by this logic. |
- | | headerValue2 | what does it say? how is it changed? | | + | |
- | | headerValue3 | what does it say? how is it changed? | | + | |
- | | headerValue4 | what does it say? how is it changed? | | + | |
- | + | ||
- | ==== thisIsTheNameOfMode2 ==== | + | |
- | Here, a short introduction for the given mode should be placed. Again, state WHAT and WHY this mode us useful in not more than 2 sentences. | + | |
- | + | ||
- | |< 100% 30% >| | + | |
- | ^ Parameters ^ Description ^ | + | |
- | | Some changeable parameter | Description of this parameter | | + | |
- | | -> and its sub-parameter | more description | | + | |
- | | Next main parameter | and more more more | | + | |
- | | -> and its sub-parameter | ... descriptions | | + | |
- | + | ||
- | |< 100% 30% >| | + | |
- | ^ Input ^ Description ^ | + | |
- | | FirstInput | Input Description 1 | | + | |
- | | SecondImput | Input Description 2 | | + | |
- | | ThridImput | Input Description 1 | | + | |
- | + | ||
- | |< 100% 30% >| | + | |
- | ^ Output ^ Description ^ | + | |
- | | FirstOutput | Output Description | | + | |
- | + | ||
- | |< 100% 30% >| | + | |
- | ^ New/Changed Header Values ^ Description ^ | + | |
- | | headerValue1 | what does it say? how is it changed? | | + | |
- | | headerValue2 | what does it say? how is it changed? | | + | |
- | | headerValue3 | what does it say? how is it changed? | | + | |
- | | headerValue4 | what does it say? how is it changed? | | + | |
===== Concept ===== | ===== Concept ===== | ||
- | In this paragraph, the "HOW a logic works under the hood" and WHY someone should use it can be elaborated with higher detail. Describes a scenario in an image processing workflow where this logic can be used to solve the resulting problem. Also, wikipages, publications or anything else describing the theory behind an algorithm should be linked here, if applicable. | + | This module creates a database which is basically the union of all input header values. Then the given SQL statement is applied onto this database and the resulting header keys (with the corresponding images) are written to the output. |