dicomifier.bruker#
- class dicomifier.bruker.Dataset#
A Bruker dataset. This objects implements part of the mapping protocol:
"foo" in d,d["foo"]andfor x in dare valid constructs.- get_field(self: dicomifier.bruker.Dataset, name: str) dicomifier::bruker::Field#
Return the field, throw an exception if field is missing.
- get_used_files(self: dicomifier.bruker.Dataset) List[str]#
Return a set of files used to create the dataset (except the PixelData file)
- has_field(self: dicomifier.bruker.Dataset, name: str) bool#
Test if dataset contains a given field.
- items(self: dicomifier.bruker.Dataset) Iterator#
Iterate on fields
- load(self: dicomifier.bruker.Dataset, path: str) None#
Load dataset from file, update any existing field.
- class dicomifier.bruker.Field#
A field (i.e. record in JCAMP-DX jargon) of a Bruker data set: container of named variant-typed items.
- class Item#
- get_int(self: dicomifier.bruker.Field.Item) int#
Return a int-convertible item, throw an exception if not convertible.
- get_real(self: dicomifier.bruker.Field.Item) float#
Return a real-convertible item, throw an exception if not convertible.
- get_string(self: dicomifier.bruker.Field.Item) str#
Return a string item, throw an exception if not string-typed.
- get_struct(self: dicomifier.bruker.Field.Item) List[dicomifier.bruker.Field.Item]#
Return a struct item, throw an exception if not struct-typed.
- is_int(self: dicomifier.bruker.Field.Item) bool#
Test whether item is an int.
- is_real(self: dicomifier.bruker.Field.Item) bool#
Test whether item is a real.
- is_string(self: dicomifier.bruker.Field.Item) bool#
Test whether item is a string.
- is_struct(self: dicomifier.bruker.Field.Item) bool#
Test whether item is a struct.
- property value#
- get_int(self: dicomifier.bruker.Field, index: int) int#
Return a int-convertible item, throw an exception if not convertible.
- get_real(self: dicomifier.bruker.Field, index: int) float#
Return a real-convertible item, throw an exception if not convertible.
- get_string(self: dicomifier.bruker.Field, index: int) str#
Return a string item, throw an exception if not string-typed.
- get_struct(self: dicomifier.bruker.Field, index: int) List[boost::variant<boost::detail::variant::recursive_flag<long>, double, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<boost::recursive_variant_, std::__1::allocator<boost::recursive_variant_> > >]#
Return a struct item, throw an exception if not struct-typed.
- is_int(self: dicomifier.bruker.Field, index: int) bool#
Test whether item is an int.
- is_real(self: dicomifier.bruker.Field, index: int) bool#
Test whether item is a real.
- is_string(self: dicomifier.bruker.Field, index: int) bool#
Test whether item is a string.
- is_struct(self: dicomifier.bruker.Field, index: int) bool#
Test whether item is a struct.
- property name#
Name of the field.
- property shape#
Shape of the field.
- property value#
Value of the field.