ogl_beamforming

Ultrasound Beamforming Implemented with OpenGL
git clone anongit@rnpnr.xyz:ogl_beamforming.git
Log | Files | Refs | Feed | Submodules | README | LICENSE

beamformer_core.meta (3178B)


      1 // See LICENSE for license details.
      2 @Flags PanelFlags
      3 {
      4 	List
      5 	NeedsFrame
      6 	HasSettings
      7 }
      8 
      9 @Struct PanelInfo
     10 {
     11 	[display     STR]
     12 	[string      STR]
     13 	[description STR]
     14 	[flags       PanelFlags]
     15 }
     16 
     17 @Table([name display string list needs_frame has_settings description]) PanelTable
     18 {
     19 	[Nil       `` nil   0 0 0 ``]
     20 	[Split     `` split 0 0 0 ``]
     21 	[TabGroup  `` group 0 0 0 ``]
     22 
     23 	[ComputeBarGraph     `Compute Bar Graph` compute_bar_graph  1 0 0 `Bar graph showing portions of compute occupied by each stage.`]
     24 	[ComputeStats        `Compute Stats`     compute_stats      1 0 0 `Average stats about beamforming computations.`]
     25 	[FrameViewLive       `Frame View`        frame_view_live    1 0 1 `Latest frame with selected tag.`]
     26 	[FrameViewCopy       `Frame View (Copy)` frame_view_copy    0 1 1 `Copy of an old frame. Useful for comparisons.`]
     27 	[FrameViewXPlane     `3D X-Plane`        frame_view_xplane  1 0 1 `3D Cross Plane View.`]
     28 	[LiveImagingControls `Live Controls`     live_controls      1 0 0 `Imaging system controls.`]
     29 	[ParameterListing    `Parameter Listing` parameters_listing 1 0 1 `Editable parameter set used for beamforming.`]
     30 }
     31 @Expand(PanelTable) @Enumeration(`$(name)`) PanelKind
     32 @Emit
     33 {
     34 	`read_only global BeamformerPanelInfo beamformer_panel_infos[] = {`
     35 	@Expand(PanelTable) `	{str8_comp("$(display)"), str8_comp("$(string)"), str8_comp("$(description)"), ($(list)*BeamformerPanelFlags_List)|($(needs_frame)*BeamformerPanelFlags_NeedsFrame)|($(has_settings)*BeamformerPanelFlags_HasSettings)},`
     36 	`};`
     37 }
     38 
     39 @Table ([type name upper]) RegistersTable
     40 {
     41 	[STR string           String        ]
     42 	[U64 tree_node        TreeNode      ]
     43 	[U64 window           Window        ]
     44 	[U64 frame            Frame         ]
     45 
     46 	[U64 frame_view       FrameView     ]
     47 	[U64 live_controls    LiveControls  ]
     48 
     49 	// NOTE(rnp): Panel Movement and Splitting
     50 	[U64 split_axis       SplitAxis     ]
     51 	[U64 split_left_tree  SplitLeftTree ]
     52 	[U64 split_right_tree SplitRightTree]
     53 
     54 	[U64 drop_target_tree DropTargetTree]
     55 	[U64 drop_child_index DropChildIndex]
     56 }
     57 @Expand(RegistersTable) @Struct([`$(name)` `$(type)`]) Registers
     58 @Expand(RegistersTable) @Enumeration(`$(upper)`)       RegisterSlot
     59 
     60 @Emit
     61 {
     62 	`#define beamformer_registers_init_literal \`
     63 	@Expand(RegistersTable) `	.$(name)$(|)= beamformer_registers()->$(name), \`
     64 }
     65 
     66 @Struct CommandInfo
     67 {
     68 	[string      STR]
     69 	[display     STR]
     70 	[description STR]
     71 }
     72 
     73 @Table([kind string display_string description]) CommandTable
     74 {
     75 	// NOTE(rnp): tab commands
     76 	[CloseTab  `close_tab`  `Close Tab`  `Closes currently active tab.`]
     77 	[FocusTab  `focus_tab`  `Focus Tab`  `Focus the currently selected tab in its group.`]
     78 	[MoveTab   `move_tab`   `Move Tab`   `Moves an exisiting tab to a different group/split.`]
     79 	[OpenTab   `open_tab`   `Open Tab`   `Opens a new tab with a specified view.`]
     80 	[SplitTree `split_tree` `Split Tree` `Splits the UI into two new splits.`]
     81 }
     82 
     83 @Enumeration CommandKind
     84 {
     85 	Nil
     86 	@Expand(CommandTable) `$(kind)`
     87 }
     88 
     89 @Emit
     90 {
     91 	`read_only global BeamformerCommandInfo beamformer_command_infos[] = {`
     92 	`	{0},`
     93 	@Expand(CommandTable) `	{str8_comp("$(string)"), str8_comp("$(display_string)"), str8_comp("$(description)")},`
     94 	`};`
     95 }