Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API] Added features for dicoms : PatientName and images: isPhantom #6899

Merged
merged 43 commits into from
Nov 9, 2020
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
d259d63
[API] Added isPhantom to images attributes
spell00 Aug 12, 2020
a1a7a79
[API] isPHantom typo corrected
spell00 Aug 12, 2020
f06d25c
[API] Add missing attributes from DicomTarDTO and ImageDTO
spell00 Aug 12, 2020
0acacb8
Adds new features to the integration test suite
spell00 Sep 4, 2020
3f17dbc
updating v0.0.4-dev doc
spell00 Oct 30, 2020
39b8495
Restore last lines
spell00 Oct 30, 2020
0f425c1
remove last commit
spell00 Oct 30, 2020
b27d62b
downgrade composer to latest 1.x branch
spell00 Nov 4, 2020
4f00cf4
[API] Added isPhantom to images attributes
spell00 Aug 12, 2020
19a5227
[API] isPHantom typo corrected
spell00 Aug 12, 2020
a74d354
[API] Add missing attributes from DicomTarDTO and ImageDTO
spell00 Aug 12, 2020
c2e859d
Adds new features to the integration test suite
spell00 Sep 4, 2020
14881b3
updating v0.0.4-dev doc
spell00 Oct 30, 2020
4bae556
Restore last lines
spell00 Oct 30, 2020
7fd7b8b
remove last commit
spell00 Oct 30, 2020
fe8bd6f
Merge branch '2020-08-11-AddFeaturesViewsFromDTO' of https://github.c…
spell00 Nov 4, 2020
93f391d
revert to previous commit 0f425c11cbce15edb7c2161006c28ae42d9f05dc
spell00 Nov 4, 2020
c8f08ee
Revert "[genomic_browser] upgraded module for react (#5835)"
spell00 Nov 4, 2020
04f966f
[API] Added isPhantom to images attributes
spell00 Aug 12, 2020
e94e1de
[API] isPHantom typo corrected
spell00 Aug 12, 2020
d7e1cd6
[API] Add missing attributes from DicomTarDTO and ImageDTO
spell00 Aug 12, 2020
bdd60b7
Adds new features to the integration test suite
spell00 Sep 4, 2020
49c2479
updating v0.0.4-dev doc
spell00 Oct 30, 2020
84c797d
Restore last lines
spell00 Oct 30, 2020
172ccae
remove last commit
spell00 Oct 30, 2020
2d52c2c
[API] Added isPhantom to images attributes
spell00 Aug 12, 2020
332416d
[API] isPHantom typo corrected
spell00 Aug 12, 2020
087bef6
Restore last lines
spell00 Oct 30, 2020
645bcb1
remove last commit
spell00 Oct 30, 2020
0a2e346
revert to previous commit 0f425c11cbce15edb7c2161006c28ae42d9f05dc
spell00 Nov 4, 2020
9bcc17c
Revert "[genomic_browser] upgraded module for react (#5835)"
spell00 Nov 4, 2020
bc711e6
remove last thing from bad rebase
spell00 Nov 4, 2020
92ffc45
Revert "remove last thing from bad rebase"
spell00 Nov 4, 2020
9b743a3
Revert "Revert "[genomic_browser] upgraded module for react (#5835)""
spell00 Nov 4, 2020
8c4b3f4
Revert "Revert "remove last thing from bad rebase""
spell00 Nov 4, 2020
495a60d
Revert "remove last thing from bad rebase"
spell00 Nov 4, 2020
f125da7
Revert "Revert "remove last thing from bad rebase""
spell00 Nov 4, 2020
4d3c890
reverting
spell00 Nov 4, 2020
f60443d
remove errors
spell00 Nov 4, 2020
a1a1fbc
Removing errors from rebase
spell00 Nov 4, 2020
dd202d3
last thing to finish clearing bad rebase
spell00 Nov 4, 2020
0c5321e
add version
spell00 Nov 5, 2020
9623b9b
remove files
spell00 Nov 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions modules/api/docs/LorisRESTAPI_v0.0.4-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,7 @@ the form:
"OutputType" : "native",
"Filename" : "abc.mnc",
"AcquisitionType" : "t1w/t2w/etc",
"IsPhantom" : true/false,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to say this isn't valid js so it's going to be rendered as an error since it's in a JS block, but then I decided to check if it's valid js in my JS console..

>> $x = true / false
Infinity

....

}, /* More files */]
}
```
Expand Down Expand Up @@ -810,6 +811,7 @@ object of the form:
[
{
"Tarname" : "DCM_yyyy-mm-dd_ImagingUpload-hh-mm-abc123.tar",
"Patientname" : "DCM123_123456_V1",
"SeriesInfo" :
[{
"SeriesDescription" : "MPRAGE_ipat2",
Expand All @@ -834,6 +836,7 @@ object of the form:
},
{
"Tarname" : "DCM_yyyy-mm-dd_ImagingUpload-hh-mm-def456.tar",
"Patientname" : "DCM456_654321_V1",
"SeriesInfo" :
[{
"SeriesDescription" : "MPRAGE_ipat2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,4 @@ class Channels extends Endpoint implements \LORIS\Middleware\ETagCalculator
{
return md5(json_encode($this->_handleGET($request)->getBody()));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,4 @@ class Metadata extends Endpoint implements \LORIS\Middleware\ETagCalculator
{
return md5(json_encode($this->_handleGET($request)->getBody()));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,4 @@ class Recording extends Endpoint implements \LORIS\Middleware\ETagCalculator

return md5(json_encode($signature));
}
}
}
2 changes: 1 addition & 1 deletion modules/api/php/endpoints/project/recordings.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,4 @@ class Recordings extends Endpoint implements \LORIS\Middleware\ETagCalculator
{
return md5(json_encode($this->_handleGET($request)->getBody()));
}
}
}
5 changes: 3 additions & 2 deletions modules/api/php/views/visit/dicoms.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ class Dicoms
private static function _formatDicomTars(DicomTarDTO $dicom): array
{
return [
'Tarname' => $dicom->getTarname(),
'SeriesInfo' => array_map(
'Tarname' => $dicom->getTarname(),
'Patientname' => $dicom->getPatientname(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is changing the result for both 0.0.3 and 0.0.4-dev, it needs a version check.

'SeriesInfo' => array_map(
[
'self',
'_formatSeries'
Expand Down
1 change: 1 addition & 0 deletions modules/api/php/views/visit/images.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class Images
'OutputType' => $image->getOutputType(),
'Filename' => $image->getFilename(),
'AcquisitionType' => $image->getAcquisitionprotocol(),
'IsPhantom' => $image->isPhantom(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

];
},
$this->_images
Expand Down
16 changes: 16 additions & 0 deletions raisinbread/test/api/LorisApiDicomsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@ public function testGetCandidatesCandidVisitDicoms(): void
),
'array'
);
$this->assertSame(
gettype(
$dicomArray['DicomTars']['0']['Tarname']
),
'string'
);
$this->assertSame(
gettype(
$dicomArray['DicomTars']['0']['Patientname']
),
'string'
);
$this->assertSame(
gettype(
$dicomArray['DicomTars']['0']['SeriesInfo']['0']
Expand Down Expand Up @@ -150,6 +162,10 @@ public function testGetCandidatesCandidVisitDicoms(): void
'Tarname',
$dicomArray['DicomTars']['0']
);
$this->assertArrayHasKey(
'Patientname',
$dicomArray['DicomTars']['0']
);

$this->assertArrayHasKey(
'SeriesInfo',
Expand Down
5 changes: 5 additions & 0 deletions raisinbread/test/api/LorisApiImagesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ public function testGetCandidatesCandidVisitImages(): void
gettype($imagesArray['Files']['0']['AcquisitionType']),
'string'
);
$this->assertSame(
gettype($imagesArray['Files']['0']['IsPhantom']),
'boolean'
);

$this->assertArrayHasKey('Meta', $imagesArray);
$this->assertArrayHasKey('CandID', $imagesArray['Meta']);
Expand All @@ -75,6 +79,7 @@ public function testGetCandidatesCandidVisitImages(): void
$this->assertArrayHasKey('OutputType', $imagesArray['Files']['0']);
$this->assertArrayHasKey('Filename', $imagesArray['Files']['0']);
$this->assertArrayHasKey('AcquisitionType', $imagesArray['Files']['0']);
$this->assertArrayHasKey('IsPhantom', $imagesArray['Files']['0']);
}

/**
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.