scan_info module

A set of classes used to describe a phantom dataset.

Broadly, the hierarchy of classes here is as follows:

  • A Study is comprised of a set of ScanSessions, each examining the same sample test tube.
  • A ScanSession is comprised of a set of SingleScans of (different regions of) the sample.
  • A sample test tube contains a set of Phantoms.
  • Each phantom has an infill Pattern.
class scan_info.AlternatingPattern(pattern_0, pattern_1)

Bases: object

An infill pattern that changes from layer to layer.

Parameters:pattern_1 (pattern_0,) – The two patterns that alternate.
get_geometry_generators()

A dictionary of functions that describe the infill geometry.

For alternating patterns, only the crossing angle has a consistent definition, which is based on the directions of the underlying infill patterns.

class scan_info.ConcentricArcPattern(origin)

Bases: object

An infill pattern composed of concentric arcs.

This pattern represents bending fibres in the brain.

Parameters:origin (tuple of float) – The x and y coordinates of the arcs’ common centre, relative to the centroid of the phantom’s cross section.
get_geometry_generators()

A dictionary of functions that describe the infill geometry.

For concentric arc infill, there is a constant crossing angle (0), but the fibre direction (tangent to each arc) changes and there is an arc radius that changes in the phantom.

class scan_info.EmptyPattern

Bases: object

A placeholder infill pattern for empty slices.

get_geometry_generators()
class scan_info.ParallelLinePattern(cura_angle)

Bases: object

An infill pattern composed only of parallel lines.

Parameters:cura_angle (float) – The “direction” of the lines, as specified in cura, in degrees.
get_geometry_generators()

A dictionary of functions that describe the infill geometry.

For parallel line infill, the fibre direction and crossing angle are both constant because there is no orientation dispersion of any kind.

class scan_info.Phantom(hotend_temp, print_speed, layer_thickness, infill_density, infill_pattern)

Bases: object

Description of a phantom’s design and print parameters.

This class has no intrinsic functionality, but contains a full description of a phantom’s design and print process.

Parameters:
  • hotend_temp (float) – The temperature, in degrees Celsius, at which the phantom was 3D printed.
  • print_speed (float) – The speed, in mm/s, at which the phantom was 3D printed.
  • layer_thickness (float) – The thickness, in mm, of each of the phantom’s layers.
  • infill_density (float) – The infill density, as a percentage, with which the phantom was printed.
  • infill_pattern (Pattern) – The infill pattern with which the phantom was printed.
class scan_info.ScanSession(date, scans)

Bases: object

A description of a single day of scans covering a set of phantoms.

Parameters:
  • date (datetime.date) – The date of the scan session.
  • scans (list of SingleScan) – The set of scans that were conducted.
class scan_info.SingleScan(tube_slice)

Bases: object

A single scan covering some subset of a set of phantoms.

There should be one DWI that corresponds to each scan.

Parameters:tube_slice (slice) – The slice of a list of phantoms that was covered in the scan.
class scan_info.Study(name, tube, sessions)

Bases: object

A data class fully documenting a study using one set of phantoms.

A “study,” in this context, refers to a series of scans of the same set of phantoms.

Parameters:
  • name (str) – A name for the study.
  • tube (list of Phantom) – A list containing each phantom in the set that was scanned.
  • sessions (list of ScanSession) – A list containing each session of phantom scans.
class scan_info.WaterSlice

Bases: object

A placeholder for a scan slice containing only water.