toor.TORFilesReader package#

Submodules#

toor.TORFilesReader.Radioisotope module#

class toor.TORFilesReader.Radioisotope.RadioisotopeInfo[source]#

Bases: object

This class contains the information about the radioisotope used in the scan. Allows to add the multiple tracers. Atributes:

setTracers() list[source]#

Set the list of tracers

setHalfLifes() list[source]#

Set the list of half lifes

setPositronFractions() list[source]#

Set the list of positron fractions

setDecayFactor() list[source]#

Set the decay factor

setDecayTypes() list[source]#

Set the decay types

setDecayEnergies() list[source]#

Set the decay energies

setDecayPercentage() list[source]#

Set the decay percentage

setResidualActivity() list[source]#

Set the residual activity

setTotalDose() list[source]#

Set the total dose

setRoute() list[source]#

Set the route

setStartDate() list[source]#

Set the start date

setEndDate() list[source]#

Set the end date

setInjectionDateTime() list#

Set the injection date time

setBatchCodeValue() list#

Set the batch code value

setBatchCodingSchemeDesignator() list#

Set the batch coding scheme designator

setBatchCodingSchemeVersion() list#

Set the batch coding scheme version

setBatchCodeMeaning() list#

Set the batch code meaning

setBatchLongCodeValue() list#

Set the batch long code value

Not implemented

property decayEnergies#

Get the decay energies Returns: list: [511] in KeV

property decayFactor#

Get the decay factor

property decayPercentage#

Get the decay percentage Returns: list: [0.97]

property decayTypes#

Get the decay types Returns: list: [‘BetaPlus’] # BetaPlus, BetaMinus, Alpha, Gamma

property endDateTime#

Get the end date time Returns: list: [‘2025-03-24 00:00:00’]

property halfLifes#

Get the list of half lifes Returns: list: e.g. [6586.26, 1224] in seconds

property positronFractions#

Get the list of positron fractions Returns: list: [0.97]

property residualActivity#

Get the residual activity Returns: list: [10] in MBq

property route#

Get the route Returns: list: [‘IV’]

setDecayEnergies(decayEnergies)[source]#

Set the decay energies Example: [511] in KeV

setDecayFactor(decayFactor)[source]#

Set the decay factor Example:[1.0]

setDecayPercentage(decayPercentage)[source]#

Set the decay percentage Example: [0.97]

setDecayTypes(decayTypes)[source]#

Set the decay types Example: [‘BetaPlus’, ‘BetaMinus’, ‘Alpha’, ‘Gamma’]

setEndDate(endDateTime)[source]#

Set the end date time Example: [‘2025-03-24 00:00:00’]

setHalfLifes(halfLifes)[source]#

Set a list of half lifes Example: [6586.26, 1224] in seconds. Each value needs to be a float

setPositronFractions(positronFractions)[source]#

Set the positron fraction Example: [0.97]

setResidualActivity(residualActivity)[source]#

Set the residual activity Example: [10] in MBq

setRoute(route)[source]#

Set the route Example: [‘IV’]

setStartDate(startDateTime)[source]#

Set the start date time Example: [‘2025-03-24 00:00:00’]

setTotalDose(totalDose)[source]#

Set the total dose Example: [10] in MBq

setTracers(tracers)[source]#

Set a list of tracers example: [‘F18’, ‘C11’]

property startDateTime#

Get the start date time Returns: list: [‘2025-03-24 00:00:00’]

property totalDose#

Get the total dose Returns: list: [10] in MBq

property tracers#

Get the list of tracers return: list: [‘F18’, ‘C11’]

toor.TORFilesReader.scanning_body module#

ListMode body of the TOR file

class toor.TORFilesReader.scanning_body.ListModeBody[source]#

Bases: object

Class to store the statistics of the listmode data Attributes: listmode: numpy array listmodeFields: list of strings mean: numpy array with the mean for each field std: numpy array with the standard deviation for each field min: numpy array with the minimum for each field max: numpy array with the maximum for each field median: numpy array with the median for each field numberOfEvents: int numberOfEventsPerSecond: int numberOfEventsPerFrame: list of int

property countsPerGlobalID#
property frameStartIndexes: list#
generateStatistics()[source]#

Generate statistics for the listmode data

property globalDetectorID#
property indexCountsPerGlobalID#
property listmode#
property listmodeFields#
property max#
property mean#
property median#
property min#
property minDiff#
property numberOfEvents#
property numberOfEventsPerFramePerSecond#
property numberOfEventsPerSecond#
property numberOfMotors#
printStatistics()[source]#

Print the statistics of the listmode data

regenerateStats()[source]#
resetListmode()[source]#

Call this method before store the listmode data to reduce memory usage

saveVarsToFile(filename)[source]#
setCountsPerGlobalID()[source]#
setFrameStartIndexes(frameStartIndexes)[source]#
setGlobalDetectorID(globalDetectorID=None)[source]#
setListModeHistogramHybridMode()[source]#
setListmode(listmode, regenerateStats=False)[source]#

Set the listmode data

setListmodeFields(listmodeFields)[source]#
setMaxValues()[source]#
setMeanValues()[source]#
setMedianValues()[source]#
setMinDiff()[source]#
setMinValues()[source]#
setNumberOfEvents()[source]#
setNumberOfEventsPerFramePerSecond()[source]#
setNumberOfEventsPerSecond()[source]#
setNumberOfMotors()[source]#
setStdValues()[source]#
setUniqueValues()[source]#
setUniqueValuesCount()[source]#
property std#
property uniqueValues#
property uniqueValuesCount#

toor.TORFilesReader.scanning_header module#

class toor.TORFilesReader.scanning_header.AcquisitionInfo[source]#

Bases: object

property date#
property frameOfReferenceUID#
property id#
property indexesOfFrames#
property instanceUID#
property numberOfFrames#
property radioisotope#
property scanType#
setDate(date)[source]#
setFrameOfReferenceUID(frameOfReferenceUID)[source]#
setId(id)[source]#
setIndexesOfFrames(indexesOfFrames)[source]#
setInstanceUID(instanceUID)[source]#
setNumberOfFrames(numberOfFrames)[source]#
setRadioisotope(radioisotope)[source]#
setScanType(scanType)[source]#
setStudyInstanceUID(studyInstanceUID)[source]#
setSubject(subject)[source]#
setTecnhician(tecnichian)[source]#
property studyInstanceUID#
property subject#
property tecnichian#

toor.TORFilesReader.subject_type module#

class toor.TORFilesReader.subject_type.AnimalType[source]#

Bases: object

AnimalType class Attributes: - healthy: bool - diagnosis: str - observations: str - speciesDescription: str - speciesCodeValue: str - speciesCodingSchemeDesignator: str - speciesCodingSchemeVersion: str - speciesCodeMeaning: str - speciesLongCodeValue: str - speciesURNCodeValue: str - breedDescription: str - breedCodeValue: str - breedCodingSchemeDesignator: str - breedCodingSchemeVersion: str - breedCodeMeaning: str - breedLongCodeValue: str - breedURNCodeValue: str - breedResgNumber: str - breedResgCodeValue: str - breedResgCodingSchemeDesignator: str - breedResgCodingSchemeVersion: str - breedResgCodeMeaning: str - fasting: bool - fastingStart: time.time() or str - fastingDuration: int - glucoseLevel: float - glucoseTime: time.time() or str - weight: float - size: float - animalTemp: float - environmentTemp: float - position: str - typeOfAnesthesia: str - anestheticAgent: str - anestheticVolume: float - anestheticPercentage: float - gasTransport: str - gasQuantity: float - routeA: str

property diagnosis#
property healthy#
property observations#
setDiagnosis(diagnosis)[source]#

str: Diagnosis

setHealthy(healthy)[source]#

bool: Healthy or not

setObservations(observations)[source]#

str: Observations

class toor.TORFilesReader.subject_type.PhantomType[source]#

Bases: object

property digitalPhantomCopy#

Digital phantom copy (look for phantom package to find

Type:

Return

property phantomDescription#

Description of the phantom

Type:

Return

property phantomName#

Name of the phantom

Type:

Return

property phantomPurpose#

Purpose of the phantom

Type:

Return

setDigitalPhantomCopy(digitalPhantomCopy)[source]#

Set the digital phantom copy

setPhantomDescription(phantomDescription)[source]#

Set the description of the phantom

setPhantomName(phantomName)[source]#

Set the name of the phantom

setPhantomPurpose(phantomPurpose)[source]#

Set the purpose of the phantom

toor.TORFilesReader.technician module#

class toor.TORFilesReader.technician.Technician[source]#

Bases: object

setAnimalWelfareResponsibleOrganization(animalWelfareResponsibleOrganization)[source]#
setAnimalWelfareResponsiblePerson(animalWelfareResponsiblePerson)[source]#
setAnimalWelfareResponsiblePersonRole(animalWelfareResponsiblePersonRole)[source]#
setName(name)[source]#

str: Name of the technician

setOrganization(organization)[source]#
setRole(role)[source]#

str: Role of the technician

toor.TORFilesReader.torfiles module#

class toor.TORFilesReader.torfiles.ToRFile(filepath=None, file_with_calibrations=True)[source]#

Bases: object

property acquisitionInfo#
property calibrations#
property fileBodyData#
read(filePath=None)[source]#
setAcquisitionInfo(acquisitionInfo)[source]#
setCalibrations(calibrations)[source]#
setSystemInfo(systemInfo)[source]#
setfileBodyData(data)[source]#
property systemInfo#
property version#
write()[source]#

Module contents#