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 (3337B)


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