Querying your database ------------------------ See :doc:`database` on how to create a database that can be queried. Combine queries to select specific rows from the database and utilize them in the conversion planning process. Queries support chaining, allowing users to refine selections by applying multiple filter criteria sequentially. This chaining mechanism enables precise and flexible data selection. .. code-block:: python from dicomselect import Database # Initialize an existing .db db = Database(existing_db_path) with db as query: query_0000 = query.where('patient_id', '=', 'ProstateX-0000').where('image_direction', '=', 'transverse') print(query_0000.include('image_direction', 'rows', 'columns', 'flip_angle')) The `print` gives: .. code-block:: console Total selected DICOMs: 5 ======================== image_direction (5) transverse rows (4) 128 (1) 384 columns (3) 84 (1) 384 (1) 128 flip_angle (3) 90.0 (1) 160.0 (1) 14.0 Query API ---------------- .. automodule:: dicomselect.query :members: :undoc-members: