Skip to content

Commit

Permalink
import 3d segmentation variant - there may still be problems here bec…
Browse files Browse the repository at this point in the history
…ause the names may not have the same template
  • Loading branch information
Cristian Goina committed May 28, 2024
1 parent f51a84e commit f5bbbe4
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import java.util.Map;
import java.util.Set;
import java.util.function.BiFunction;
import java.util.function.Function;

import javax.validation.GroupSequence;
import javax.validation.constraints.NotBlank;
Expand Down Expand Up @@ -48,7 +47,7 @@ public abstract class AbstractNeuronMetadata {
private String alignmentSpace;
private String anatomicalArea;
private Gender gender;
private List<String> terms;
private List<String> annotations;
private boolean unpublished;
// neuronFiles holds S3 files used by the NeuronBridge app
private final Map<FileType, String> neuronFiles = new HashMap<>();
Expand Down Expand Up @@ -156,12 +155,12 @@ public void setGender(Gender gender) {
this.gender = gender;
}

public List<String> getTerms() {
return terms;
public List<String> getAnnotations() {
return annotations;
}

public void setTerms(List<String> terms) {
this.terms = terms;
public void setAnnotations(List<String> annotations) {
this.annotations = annotations;
}

@JsonIgnore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public enum ComputeFileType {
GradientImage,
// RGB 20px Z-gap images
ZGapImage,
Vol3DSegmentation,
SkeletonSWC,
SkeletonOBJ;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package org.janelia.colormipsearch.model;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.janelia.colormipsearch.dto.EMNeuronMetadata;

Expand Down Expand Up @@ -62,7 +60,7 @@ public EMNeuronMetadata metadata() {
n.setPublishedName(getPublishedName());
n.setNeuronType(getNeuronType());
n.setNeuronInstance(getNeuronInstance());
n.setTerms(getNeuronTerms());
n.setAnnotations(getNeuronTerms());
getComputeFiles().forEach((ft, fd) -> n.setNeuronComputeFile(ft, fd.getFileName()));
getProcessedTags().forEach(n::putProcessedTags);
return n;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package org.janelia.colormipsearch.model;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonIgnore;

Expand Down Expand Up @@ -137,7 +135,7 @@ public LMNeuronMetadata metadata() {
n.setAnatomicalArea(anatomicalArea);
n.setGender(gender);
n.setObjective(objective);
n.setTerms(getNeuronTerms());
n.setAnnotations(getNeuronTerms());
getComputeFiles().forEach((ft, fd) -> n.setNeuronComputeFile(ft, fd.getFileName()));
getProcessedTags().forEach(n::putProcessedTags);
return n;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ static class CreateColorDepthSearchDataInputArgs extends AbstractCmdArgs {
put("searchable", ComputeFileType.InputColorDepthImage.name());
put("searchable_neurons", ComputeFileType.InputColorDepthImage.name());
put("segmentation", ComputeFileType.InputColorDepthImage.name());
put("3d-segmentation", ComputeFileType.Vol3DSegmentation.name());
put("vol-segmentation", ComputeFileType.Vol3DSegmentation.name());
put("fl", ComputeFileType.InputColorDepthImage.name());
put("grad", ComputeFileType.GradientImage.name());
put("gradient", ComputeFileType.GradientImage.name());
Expand Down Expand Up @@ -363,7 +365,11 @@ private void createColorDepthSearchInputData(Pair<FileData.FileDataType, Map<Str
)
.peek(cdmip -> populateOtherComputeFilesFromInput(
cdmip.getNeuronMetadata(),
EnumSet.of(ComputeFileType.GradientImage, ComputeFileType.ZGapImage),
EnumSet.of(
ComputeFileType.GradientImage,
ComputeFileType.ZGapImage,
ComputeFileType.Vol3DSegmentation
),
libraryVariants,
searchableLibraryVariant.variantTypeSuffix))
.peek(cdmip -> this.updateTag(cdmip.getNeuronMetadata()))
Expand Down

0 comments on commit f5bbbe4

Please sign in to comment.