Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ https://github.com/nih-sparc/sparc-api/blob/f3444a32964f5340e0ee1f10a08a05839620

```
ADDITIONAL_LINKS = 'additionalLinks'
BIOLUCIDA_2D = 'biolucida-2d'
BIOLUCIDA_3D = 'biolucida-3d'
COMMON_IMAGES = 'common-images'
CONTEXT_FILE = 'abi-context-file'
CSV = 'csv'
Expand Down
1 change: 0 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ export default {
ALGOLIA_INDEX: import.meta.env.VITE_APP_ALGOLIA_INDEX,
PENNSIEVE_API_LOCATION: import.meta.env.VITE_APP_PENNSIEVE_API_LOCATION,
BL_SERVER_URL: import.meta.env.VITE_APP_BL_SERVER_URL,
NL_LINK_PREFIX: import.meta.env.VITE_APP_NL_LINK_PREFIX,
ROOT_URL: import.meta.env.VITE_APP_ROOT_URL,
FLATMAPAPI_LOCATION: import.meta.env.VITE_FLATMAPAPI_LOCATION,
},
Expand Down
18 changes: 1 addition & 17 deletions src/components/BadgesGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ export default {
return []
},
},
datasetBiolucida: {
type: Object,
default: () => {
return {}
},
},
entry: {
type: Object,
default: () => {
Expand Down Expand Up @@ -72,23 +66,13 @@ export default {
},
},
watch: {
datasetBiolucida: {
deep: true,
immediate: true,
handler: function (biolucidaData) {
if ('dataset_images' in biolucidaData) {
this.addToCategories(biolucidaData['dataset_images'], 'Images')
}
},
},
entry: {
deep: true,
immediate: true,
handler: function () {
this.addToCategories(this.entry.flatmaps, 'Flatmaps')
this.addToCategories(this.entry.plots, 'Plots')
this.addToCategories(this.entry.scaffolds, 'Scaffolds')
this.addToCategories(this.entry.segmentation, 'Segmentations')
this.addSimulationsToCategories(this.entry.simulation)
/** disable the following
this.addToCategories(this.entry.images, 'Images');
Expand Down Expand Up @@ -117,7 +101,7 @@ export default {
color: #fff!important;
}
}

.tag-button + .tag-button {
margin-left: 0!important;
}
Expand Down
30 changes: 0 additions & 30 deletions src/components/DatasetCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
:envVars="envVars"
:label="label"
:datasetThumbnail="thumbnail"
:dataset-biolucida="biolucidaData"
:category="currentCategory"
@card-clicked="galleryClicked"
@datalink-clicked="galleryDatalinkClicked"
Expand Down Expand Up @@ -42,7 +41,6 @@
<div class="badges-container">
<BadgesGroup
:entry="entry"
:dataset-biolucida="biolucidaData"
@categoryChanged="categoryChanged"
/>
</div>
Expand All @@ -60,7 +58,6 @@
<script>
/* eslint-disable no-alert, no-console */
import { View as ElIconView } from '@element-plus/icons-vue'
import { Base64 } from 'js-base64';
import BadgesGroup from './BadgesGroup.vue'
import {
ElButton as Button,
Expand Down Expand Up @@ -109,7 +106,6 @@ export default {
loading: true,
version: 1,
lastDoi: undefined,
biolucidaData: undefined,
currentCategory: 'All',
copyContent: '',
}
Expand Down Expand Up @@ -237,7 +233,6 @@ export default {
this.discoverId = data.id
this.version = data.version
this.dataLocation = `https://sparc.science/datasets/${data.id}?type=dataset`
this.getBiolucidaInfo()
this.loading = false
this.updateCopyContent();
})
Expand All @@ -252,31 +247,6 @@ export default {
lastName: function (fullName) {
return fullName.split(',')[0]
},
getBiolucidaInfo: function () {
const dataset_images = [];
const biolucida2DItems = 'biolucida-2d' in this.entry ? this.entry['biolucida-2d'] :[];
const biolucida3DItems = 'biolucida-3d' in this.entry ? this.entry['biolucida-3d'] :[];
// We use information from SciCrunch to create the sharelink
biolucida2DItems.concat(biolucida3DItems).forEach((bObject) => {
const image_id = bObject.biolucida?.identifier;
if (image_id) {
const sourcepkg_id = 'identifier' in bObject ? bObject['identifier'] : "";
// The encoded string is in the following format -
// ${image_id}-col-${collection_id}, collection id can be any valid collection id
// and 260 is used for now.
const code = encodeURIComponent(Base64.encode(`${image_id}-col-260`));
const share_link = `https://sparc.biolucida.net/image?c=${code}`
dataset_images.push({
share_link,
image_id,
sourcepkg_id,
});
}
});
if (dataset_images.length > 0) {
this.biolucidaData = { dataset_images };
}
},
updateCopyContent: function () {
const contentArray = [];

Expand Down
1 change: 0 additions & 1 deletion src/components/DatasetExplorer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,6 @@ export default {
element['abi-contextual-information'].length > 0
? element['abi-contextual-information']
: undefined,
segmentation: element['mbf-segmentation'],
//omex format will be the preferred mimetype
simulation: element['abi-simulation-omex-file'] ? element['abi-simulation-omex-file'] : element['abi-simulation-file'],
flatmaps: element['abi-flatmap-file'],
Expand Down
93 changes: 0 additions & 93 deletions src/components/ImageGallery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ export default {
components: { Gallery },
mixins: [GalleryHelper, S3Bucket],
props: {
datasetBiolucida: {
type: Object,
default: () => {
return {}
},
},
envVars: {
type: Object,
default: () => {},
Expand Down Expand Up @@ -89,13 +83,10 @@ export default {
ro: null,
maxWidth: 3,
items: {
//Use the Images instead for Biolucida Images
//"Biolucida Images": [],
Dataset: [],
Flatmaps:[],
Images: [],
Scaffolds: [],
Segmentations: [],
Simulations: [],
Videos: [],
Plots: [],
Expand Down Expand Up @@ -128,7 +119,6 @@ export default {
this.createScaffoldItems()
this.createSimulationItems()
this.createPlotItems()
this.createSegmentationItems()
/* Disable these two
this.createImageItems();
this.createVideoItems();
Expand Down Expand Up @@ -324,47 +314,6 @@ export default {
})
}
},
createSegmentationItems: function () {
if (this.entry.segmentation) {
this.entry.segmentation.forEach((segmentation) => {
const id = segmentation.id
let filePath = segmentation.dataset.path
filePath = filePath.replaceAll(' ', '_')
filePath = filePath.replaceAll(',', '_')
const prefix = this.envVars.NL_LINK_PREFIX
const resource = {
share_link: `${prefix}/dataviewer?datasetId=${this.datasetId}&version=${this.datasetVersion}&path=files/${filePath}`,
}
let action = {
label: capitalise(this.label),
resource: resource,
datasetId: this.datasetId,
s3uri: this.entry.s3uri,
title: 'View segmentation',
type: 'Segmentation',
}
const thumbnailURL = this.getSegmentationThumbnailURL(
this.envVars.API_LOCATION,
{
id,
datasetId: this.datasetId,
datasetVersion: this.datasetVersion,
segmentationFilePath: filePath,
s3Bucket: this.s3Bucket,
}
)
this.items['Segmentations'].push({
id,
title: baseName(filePath),
type: 'Segmentation',
thumbnail: thumbnailURL,
userData: action,
hideType: true,
mimetype: 'image/png',
})
})
}
},
createSimulationItems: function () {
if (this.entry.simulation) {
this.entry.simulation.forEach((simulation) => {
Expand Down Expand Up @@ -496,48 +445,6 @@ export default {
galleryItems: function () {
this.resetIndex = false
},
datasetBiolucida: {
deep: true,
immediate: true,
handler: function (biolucidaData) {
let items = []
if ('dataset_images' in biolucidaData) {
items.push(
...Array.from(biolucidaData.dataset_images, (dataset_image) => {
const thumbnailURL = this.getThumbnailURLFromBiolucida(
this.envVars.API_LOCATION,
{
id: dataset_image.image_id,
}
)
const resource = {
share_link: dataset_image.share_link,
id: dataset_image.image_id,
itemId: dataset_image.sourcepkg_id,
}
let action = {
label: capitalise(this.label),
resource: resource,
datasetId: this.datasetId,
title: 'View image',
name: capitalise(this.label),
type: 'Biolucida',
}
return {
id: dataset_image.image_id,
title: `Image`,
type: 'Image',
thumbnail: thumbnailURL,
userData: action,
mimetype: 'image/png',
hideType: true,
}
})
)
}
this.items['Images'] = items
},
},
},
mounted() {
this.ro = new ResizeObserver(this.onResize).observe(this.$el)
Expand Down
5 changes: 2 additions & 3 deletions src/components/SideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,8 @@ export default {
},
/**
* The environment variables object with
* `API_LOCATION`, `ALGOLIA_KEY`, `ALGOLIA_ID`,
* `ALGOLIA_INDEX`, `PENNSIEVE_API_LOCATION`, `BL_SERVER_URL`,
* `NL_LINK_PREFIX`, `ROOT_URL`
* `API_LOCATION`, `ALGOLIA_KEY`, `ALGOLIA_ID`, `ALGOLIA_INDEX`,
* `PENNSIEVE_API_LOCATION`, `BL_SERVER_URL`, `ROOT_URL`
*/
envVars: {
type: Object,
Expand Down