-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement MATLAB generator and analysis tools
- Loading branch information
Showing
130 changed files
with
5,336 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
% This file was generated by the "yardl" tool. DO NOT EDIT. | ||
|
||
classdef AnnulusShapeSerializer < yardl.binary.RecordSerializer | ||
methods | ||
function self = AnnulusShapeSerializer() | ||
field_serializers{1} = yardl.binary.Float32Serializer; | ||
field_serializers{2} = yardl.binary.Float32Serializer; | ||
field_serializers{3} = yardl.binary.Float32Serializer; | ||
field_serializers{4} = yardl.binary.FixedVectorSerializer(yardl.binary.Float32Serializer, 2); | ||
[email protected]('petsird.AnnulusShape', field_serializers); | ||
end | ||
|
||
function write(self, outstream, value) | ||
arguments | ||
self | ||
outstream (1,1) yardl.binary.CodedOutputStream | ||
value (1,1) petsird.AnnulusShape | ||
end | ||
self.write_(outstream, value.inner_radius, value.outer_radius, value.thickness, value.angular_range); | ||
end | ||
|
||
function value = read(self, instream) | ||
fields = self.read_(instream); | ||
value = petsird.AnnulusShape(inner_radius=fields{1}, outer_radius=fields{2}, thickness=fields{3}, angular_range=fields{4}); | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
% This file was generated by the "yardl" tool. DO NOT EDIT. | ||
|
||
classdef AtomSerializer < yardl.binary.RecordSerializer | ||
methods | ||
function self = AtomSerializer() | ||
field_serializers{1} = yardl.binary.Uint32Serializer; | ||
field_serializers{2} = yardl.binary.Uint32Serializer; | ||
[email protected]('petsird.Atom', field_serializers); | ||
end | ||
|
||
function write(self, outstream, value) | ||
arguments | ||
self | ||
outstream (1,1) yardl.binary.CodedOutputStream | ||
value (1,1) petsird.Atom | ||
end | ||
self.write_(outstream, value.mass_number, value.atomic_number); | ||
end | ||
|
||
function value = read(self, instream) | ||
fields = self.read_(instream); | ||
value = petsird.Atom(mass_number=fields{1}, atomic_number=fields{2}); | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
% This file was generated by the "yardl" tool. DO NOT EDIT. | ||
|
||
classdef BedMovementTimeBlockSerializer < yardl.binary.RecordSerializer | ||
methods | ||
function self = BedMovementTimeBlockSerializer() | ||
field_serializers{1} = yardl.binary.Uint32Serializer; | ||
field_serializers{2} = petsird.binary.RigidTransformationSerializer(); | ||
[email protected]('petsird.BedMovementTimeBlock', field_serializers); | ||
end | ||
|
||
function write(self, outstream, value) | ||
arguments | ||
self | ||
outstream (1,1) yardl.binary.CodedOutputStream | ||
value (1,1) petsird.BedMovementTimeBlock | ||
end | ||
self.write_(outstream, value.start, value.transform); | ||
end | ||
|
||
function value = read(self, instream) | ||
fields = self.read_(instream); | ||
value = petsird.BedMovementTimeBlock(start=fields{1}, transform=fields{2}); | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
% This file was generated by the "yardl" tool. DO NOT EDIT. | ||
|
||
classdef BoxShapeSerializer < yardl.binary.RecordSerializer | ||
methods | ||
function self = BoxShapeSerializer() | ||
field_serializers{1} = yardl.binary.FixedVectorSerializer(petsird.binary.CoordinateSerializer(), 8); | ||
[email protected]('petsird.BoxShape', field_serializers); | ||
end | ||
|
||
function write(self, outstream, value) | ||
arguments | ||
self | ||
outstream (1,1) yardl.binary.CodedOutputStream | ||
value (1,1) petsird.BoxShape | ||
end | ||
self.write_(outstream, value.corners); | ||
end | ||
|
||
function value = read(self, instream) | ||
fields = self.read_(instream); | ||
value = petsird.BoxShape(corners=fields{1}); | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
% This file was generated by the "yardl" tool. DO NOT EDIT. | ||
|
||
classdef BulkMaterialSerializer < yardl.binary.RecordSerializer | ||
methods | ||
function self = BulkMaterialSerializer() | ||
field_serializers{1} = yardl.binary.Uint32Serializer; | ||
field_serializers{2} = yardl.binary.StringSerializer; | ||
field_serializers{3} = yardl.binary.Float32Serializer; | ||
field_serializers{4} = yardl.binary.VectorSerializer(petsird.binary.AtomSerializer()); | ||
field_serializers{5} = yardl.binary.VectorSerializer(yardl.binary.Float32Serializer); | ||
[email protected]('petsird.BulkMaterial', field_serializers); | ||
end | ||
|
||
function write(self, outstream, value) | ||
arguments | ||
self | ||
outstream (1,1) yardl.binary.CodedOutputStream | ||
value (1,1) petsird.BulkMaterial | ||
end | ||
self.write_(outstream, value.id, value.name, value.density, value.atoms, value.mass_fractions); | ||
end | ||
|
||
function value = read(self, instream) | ||
fields = self.read_(instream); | ||
value = petsird.BulkMaterial(id=fields{1}, name=fields{2}, density=fields{3}, atoms=fields{4}, mass_fractions=fields{5}); | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
% This file was generated by the "yardl" tool. DO NOT EDIT. | ||
|
||
classdef CoincidenceEventSerializer < yardl.binary.RecordSerializer | ||
methods | ||
function self = CoincidenceEventSerializer() | ||
field_serializers{1} = yardl.binary.FixedVectorSerializer(yardl.binary.Uint32Serializer, 2); | ||
field_serializers{2} = yardl.binary.Uint32Serializer; | ||
field_serializers{3} = yardl.binary.FixedVectorSerializer(yardl.binary.Uint32Serializer, 2); | ||
[email protected]('petsird.CoincidenceEvent', field_serializers); | ||
end | ||
|
||
function write(self, outstream, value) | ||
arguments | ||
self | ||
outstream (1,1) yardl.binary.CodedOutputStream | ||
value (1,1) petsird.CoincidenceEvent | ||
end | ||
self.write_(outstream, value.detector_ids, value.tof_idx, value.energy_indices); | ||
end | ||
|
||
function value = read(self, instream) | ||
fields = self.read_(instream); | ||
value = petsird.CoincidenceEvent(detector_ids=fields{1}, tof_idx=fields{2}, energy_indices=fields{3}); | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
% This file was generated by the "yardl" tool. DO NOT EDIT. | ||
|
||
classdef CoordinateSerializer < yardl.binary.RecordSerializer | ||
methods | ||
function self = CoordinateSerializer() | ||
field_serializers{1} = yardl.binary.FixedNDArraySerializer(yardl.binary.Float32Serializer, [3]); | ||
[email protected]('petsird.Coordinate', field_serializers); | ||
end | ||
|
||
function write(self, outstream, value) | ||
arguments | ||
self | ||
outstream (1,1) yardl.binary.CodedOutputStream | ||
value (1,1) petsird.Coordinate | ||
end | ||
self.write_(outstream, value.c); | ||
end | ||
|
||
function value = read(self, instream) | ||
fields = self.read_(instream); | ||
value = petsird.Coordinate(c=fields{1}); | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
% This file was generated by the "yardl" tool. DO NOT EDIT. | ||
|
||
classdef DeadTimeTimeBlockSerializer < yardl.binary.RecordSerializer | ||
methods | ||
function self = DeadTimeTimeBlockSerializer() | ||
field_serializers{1} = petsird.binary.TimeIntervalSerializer(); | ||
field_serializers{2} = yardl.binary.NDArraySerializer(yardl.binary.Float32Serializer, 2); | ||
field_serializers{3} = yardl.binary.NDArraySerializer(yardl.binary.Float32Serializer, 2); | ||
[email protected]('petsird.DeadTimeTimeBlock', field_serializers); | ||
end | ||
|
||
function write(self, outstream, value) | ||
arguments | ||
self | ||
outstream (1,1) yardl.binary.CodedOutputStream | ||
value (1,1) petsird.DeadTimeTimeBlock | ||
end | ||
self.write_(outstream, value.time_interval, value.singles_alive_time_fraction, value.module_coincidence_alive_time_fraction); | ||
end | ||
|
||
function value = read(self, instream) | ||
fields = self.read_(instream); | ||
value = petsird.DeadTimeTimeBlock(time_interval=fields{1}, singles_alive_time_fraction=fields{2}, module_coincidence_alive_time_fraction=fields{3}); | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
% This file was generated by the "yardl" tool. DO NOT EDIT. | ||
|
||
classdef DetectionEfficienciesSerializer < yardl.binary.RecordSerializer | ||
methods | ||
function self = DetectionEfficienciesSerializer() | ||
field_serializers{1} = yardl.binary.OptionalSerializer(yardl.binary.NDArraySerializer(yardl.binary.Float32Serializer, 2)); | ||
field_serializers{2} = yardl.binary.OptionalSerializer(yardl.binary.NDArraySerializer(yardl.binary.Int32Serializer, 2)); | ||
field_serializers{3} = yardl.binary.OptionalSerializer(yardl.binary.VectorSerializer(petsird.binary.ModulePairEfficienciesSerializer())); | ||
[email protected]('petsird.DetectionEfficiencies', field_serializers); | ||
end | ||
|
||
function write(self, outstream, value) | ||
arguments | ||
self | ||
outstream (1,1) yardl.binary.CodedOutputStream | ||
value (1,1) petsird.DetectionEfficiencies | ||
end | ||
self.write_(outstream, value.det_el_efficiencies, value.module_pair_sgidlut, value.module_pair_efficiencies_vector); | ||
end | ||
|
||
function value = read(self, instream) | ||
fields = self.read_(instream); | ||
value = petsird.DetectionEfficiencies(det_el_efficiencies=fields{1}, module_pair_sgidlut=fields{2}, module_pair_efficiencies_vector=fields{3}); | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
% This file was generated by the "yardl" tool. DO NOT EDIT. | ||
|
||
classdef DetectorModuleSerializer < yardl.binary.RecordSerializer | ||
methods | ||
function self = DetectorModuleSerializer() | ||
field_serializers{1} = yardl.binary.VectorSerializer(petsird.binary.ReplicatedObjectSerializer(petsird.binary.SolidVolumeSerializer(petsird.binary.BoxShapeSerializer()))); | ||
field_serializers{2} = yardl.binary.VectorSerializer(yardl.binary.Uint32Serializer); | ||
field_serializers{3} = yardl.binary.VectorSerializer(petsird.binary.ReplicatedObjectSerializer(petsird.binary.SolidVolumeSerializer(yardl.binary.UnionSerializer('petsird.GeometricShape', {petsird.binary.BoxShapeSerializer(), petsird.binary.AnnulusShapeSerializer()}, {@petsird.GeometricShape.BoxShape, @petsird.GeometricShape.AnnulusShape})))); | ||
[email protected]('petsird.DetectorModule', field_serializers); | ||
end | ||
|
||
function write(self, outstream, value) | ||
arguments | ||
self | ||
outstream (1,1) yardl.binary.CodedOutputStream | ||
value (1,1) petsird.DetectorModule | ||
end | ||
self.write_(outstream, value.detecting_elements, value.detecting_element_ids, value.non_detecting_elements); | ||
end | ||
|
||
function value = read(self, instream) | ||
fields = self.read_(instream); | ||
value = petsird.DetectorModule(detecting_elements=fields{1}, detecting_element_ids=fields{2}, non_detecting_elements=fields{3}); | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
% This file was generated by the "yardl" tool. DO NOT EDIT. | ||
|
||
classdef DirectionMatrixSerializer < yardl.binary.RecordSerializer | ||
methods | ||
function self = DirectionMatrixSerializer() | ||
field_serializers{1} = yardl.binary.FixedNDArraySerializer(yardl.binary.Float32Serializer, [3, 3]); | ||
[email protected]('petsird.DirectionMatrix', field_serializers); | ||
end | ||
|
||
function write(self, outstream, value) | ||
arguments | ||
self | ||
outstream (1,1) yardl.binary.CodedOutputStream | ||
value (1,1) petsird.DirectionMatrix | ||
end | ||
self.write_(outstream, value.matrix); | ||
end | ||
|
||
function value = read(self, instream) | ||
fields = self.read_(instream); | ||
value = petsird.DirectionMatrix(matrix=fields{1}); | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
% This file was generated by the "yardl" tool. DO NOT EDIT. | ||
|
||
classdef DirectionSerializer < yardl.binary.RecordSerializer | ||
methods | ||
function self = DirectionSerializer() | ||
field_serializers{1} = yardl.binary.FixedNDArraySerializer(yardl.binary.Float32Serializer, [3]); | ||
[email protected]('petsird.Direction', field_serializers); | ||
end | ||
|
||
function write(self, outstream, value) | ||
arguments | ||
self | ||
outstream (1,1) yardl.binary.CodedOutputStream | ||
value (1,1) petsird.Direction | ||
end | ||
self.write_(outstream, value.c); | ||
end | ||
|
||
function value = read(self, instream) | ||
fields = self.read_(instream); | ||
value = petsird.Direction(c=fields{1}); | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
% This file was generated by the "yardl" tool. DO NOT EDIT. | ||
|
||
classdef EventTimeBlockSerializer < yardl.binary.RecordSerializer | ||
methods | ||
function self = EventTimeBlockSerializer() | ||
field_serializers{1} = yardl.binary.Uint32Serializer; | ||
field_serializers{2} = yardl.binary.VectorSerializer(petsird.binary.CoincidenceEventSerializer()); | ||
field_serializers{3} = yardl.binary.OptionalSerializer(yardl.binary.VectorSerializer(petsird.binary.CoincidenceEventSerializer())); | ||
field_serializers{4} = yardl.binary.OptionalSerializer(yardl.binary.VectorSerializer(petsird.binary.TripleEventSerializer())); | ||
[email protected]('petsird.EventTimeBlock', field_serializers); | ||
end | ||
|
||
function write(self, outstream, value) | ||
arguments | ||
self | ||
outstream (1,1) yardl.binary.CodedOutputStream | ||
value (1,1) petsird.EventTimeBlock | ||
end | ||
self.write_(outstream, value.start, value.prompt_events, value.delayed_events, value.triple_events); | ||
end | ||
|
||
function value = read(self, instream) | ||
fields = self.read_(instream); | ||
value = petsird.EventTimeBlock(start=fields{1}, prompt_events=fields{2}, delayed_events=fields{3}, triple_events=fields{4}); | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
% This file was generated by the "yardl" tool. DO NOT EDIT. | ||
|
||
classdef ExamInformationSerializer < yardl.binary.RecordSerializer | ||
methods | ||
function self = ExamInformationSerializer() | ||
field_serializers{1} = petsird.binary.SubjectSerializer(); | ||
field_serializers{2} = petsird.binary.InstitutionSerializer(); | ||
field_serializers{3} = yardl.binary.OptionalSerializer(yardl.binary.StringSerializer); | ||
field_serializers{4} = yardl.binary.OptionalSerializer(yardl.binary.DatetimeSerializer); | ||
[email protected]('petsird.ExamInformation', field_serializers); | ||
end | ||
|
||
function write(self, outstream, value) | ||
arguments | ||
self | ||
outstream (1,1) yardl.binary.CodedOutputStream | ||
value (1,1) petsird.ExamInformation | ||
end | ||
self.write_(outstream, value.subject, value.institution, value.protocol, value.start_of_acquisition); | ||
end | ||
|
||
function value = read(self, instream) | ||
fields = self.read_(instream); | ||
value = petsird.ExamInformation(subject=fields{1}, institution=fields{2}, protocol=fields{3}, start_of_acquisition=fields{4}); | ||
end | ||
end | ||
end |
26 changes: 26 additions & 0 deletions
26
matlab/+petsird/+binary/ExternalSignalTimeBlockSerializer.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
% This file was generated by the "yardl" tool. DO NOT EDIT. | ||
|
||
classdef ExternalSignalTimeBlockSerializer < yardl.binary.RecordSerializer | ||
methods | ||
function self = ExternalSignalTimeBlockSerializer() | ||
field_serializers{1} = yardl.binary.Uint32Serializer; | ||
field_serializers{2} = yardl.binary.Uint32Serializer; | ||
field_serializers{3} = yardl.binary.VectorSerializer(yardl.binary.Float32Serializer); | ||
[email protected]('petsird.ExternalSignalTimeBlock', field_serializers); | ||
end | ||
|
||
function write(self, outstream, value) | ||
arguments | ||
self | ||
outstream (1,1) yardl.binary.CodedOutputStream | ||
value (1,1) petsird.ExternalSignalTimeBlock | ||
end | ||
self.write_(outstream, value.start, value.signal_id, value.signal_values); | ||
end | ||
|
||
function value = read(self, instream) | ||
fields = self.read_(instream); | ||
value = petsird.ExternalSignalTimeBlock(start=fields{1}, signal_id=fields{2}, signal_values=fields{3}); | ||
end | ||
end | ||
end |
Oops, something went wrong.