-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from biigle/unknot
UnKnoT
- Loading branch information
Showing
44 changed files
with
1,934 additions
and
613 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 |
---|---|---|
@@ -1,12 +1,13 @@ | ||
numpy==1.16.* | ||
scipy==1.1.* | ||
scikit-learn==0.22.* | ||
scikit-image==0.16.* | ||
Pillow==7.1.* | ||
cython | ||
matplotlib==3.1.* | ||
tensorflow==1.15.4 | ||
keras==2.1.* | ||
opencv-python-headless>=3.4.5,<4.0 | ||
h5py==2.10.* | ||
imgaug==0.3.* | ||
keras==2.1.* | ||
matplotlib==3.1.* | ||
numpy==1.16.* | ||
opencv-python-headless>=3.4.5,<4.0 | ||
Pillow==7.1.* | ||
pyvips==2.1.* | ||
scikit-image==0.16.* | ||
scikit-learn==0.22.* | ||
scipy==1.1.* | ||
tensorflow==1.15.4 |
57 changes: 57 additions & 0 deletions
57
src/Http/Controllers/Api/KnowledgeTransferVolumeController.php
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,57 @@ | ||
<?php | ||
|
||
namespace Biigle\Modules\Maia\Http\Controllers\Api; | ||
|
||
use Biigle\Http\Controllers\Api\Controller; | ||
use Biigle\Volume; | ||
use DB; | ||
use Illuminate\Http\Request; | ||
|
||
class KnowledgeTransferVolumeController extends Controller | ||
{ | ||
/** | ||
* List all volumes that can be accessed and used for knowledge transfer. | ||
* | ||
* @api {get} volumes/filter/knowledge-transfer Get volumes for knowledge transfer | ||
* @apiGroup Maia | ||
* @apiName IndexKnowledgeTransferVolumes | ||
* @apiPermission user | ||
* @apiDescription These are volumes where all images have `distance_to_ground` information. | ||
* | ||
* @apiSuccessExample {json} Success response: | ||
* [ | ||
* { | ||
* "id": 1, | ||
* "name": "My Volume", | ||
* "projects": [ | ||
* { | ||
* "id": 123, | ||
* "name": "My Project" | ||
* } | ||
* ] | ||
* } | ||
* ] | ||
* | ||
* @param Request $request | ||
* @return \Illuminate\Http\Response | ||
*/ | ||
public function index(Request $request) | ||
{ | ||
return Volume::accessibleBy($request->user()) | ||
->select('id', 'name') | ||
->has('images.annotations') | ||
->whereNotExists(function ($query) { | ||
$query->select(DB::raw(1)) | ||
->from('images') | ||
->whereRaw('images.volume_id = volumes.id') | ||
->whereNull('attrs->metadata->distance_to_ground'); | ||
}) | ||
->with(['projects' => function ($query) { | ||
$query->select('id', 'name'); | ||
}]) | ||
->get() | ||
->each(function ($volume) { | ||
$volume->setHidden(['doi', 'video_link', 'gis_link']); | ||
}); | ||
} | ||
} |
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
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
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
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
Oops, something went wrong.