dbdicom.Record.empty#
- Record.empty() bool [source]#
Check if the record has data.
- Returns:
False if the record has data, True if not
- Return type:
Example
Check if a database on disk is empty:
>>> database = db.database('path\to\database') >>> print(database.empty) False
Create a new database from scratch and verify that it is empty:
>>> database = db.database() >>> print(database.empty()) True
Creating a new series in the database, and verify that it is no longer empty:
>>> series = database.new_series() >>> print(database.empty()) False
Verify that the new series is empty:
>>> print(series.empty()) True
Populate the series with a numpy array and verify that it is now no longer empty:
>>> zeros = np.zeros((3, 2, 128, 128)) >>> series.set_ndarray(zeros) >>> print(series.empty()) False