Package ubic.gemma.core.image.aba
Class AllenBrainAtlasServiceImpl
- java.lang.Object
-
- ubic.gemma.core.image.aba.AllenBrainAtlasServiceImpl
-
- All Implemented Interfaces:
AllenBrainAtlasService
@Component public class AllenBrainAtlasServiceImpl extends Object implements AllenBrainAtlasService
Acts as a convenient front end to the Allen Brain Atlas REST (web) services Used the ABAApi.java as the original template for this Service (found in ABA demo code). For the most current API regarding these methods go to brain map DATA API web page NO AJAX Methods directly exposed by this service.- Author:
- kelsey
-
-
Constructor Summary
Constructors Constructor Description AllenBrainAtlasServiceImpl(Path appDataHome)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbaGene
getGene(Gene gene)
Given a gene too look for for will return the corresponding abaGene (useful for finding images)String
getGeneUrl(Gene gene)
Given a Gemma gene object returns an allen brain atlas gene URLCollection<Image>
getImagesFromImageSeries(Collection<ImageSeries> imageSeries)
Returns a collection of images from all the imageSeries given.Collection<ImageSeries>
getSagittalImageSeries(Gene gene)
Given a Gene, returns all the image series that contain sagittal images for the given gene.
-
-
-
Constructor Detail
-
AllenBrainAtlasServiceImpl
@Autowired public AllenBrainAtlasServiceImpl(@Value("gemma.appdata.home") Path appDataHome)
-
-
Method Detail
-
getGene
public AbaGene getGene(Gene gene)
Given a gene too look for for will return the corresponding abaGene (useful for finding images)- Specified by:
getGene
in interfaceAllenBrainAtlasService
- Parameters:
gene
- the gene to look for in ABA.- Returns:
- ABA gene
- Throws:
IllegalArgumentException
- when the given gene does not have an NCBI ID.
-
getGeneUrl
public String getGeneUrl(Gene gene)
Description copied from interface:AllenBrainAtlasService
Given a Gemma gene object returns an allen brain atlas gene URL- Specified by:
getGeneUrl
in interfaceAllenBrainAtlasService
- Parameters:
gene
- gene- Returns:
- an allen brain atlas gene details URL
-
getImagesFromImageSeries
public Collection<Image> getImagesFromImageSeries(Collection<ImageSeries> imageSeries)
Description copied from interface:AllenBrainAtlasService
Returns a collection of images from all the imageSeries given.- Specified by:
getImagesFromImageSeries
in interfaceAllenBrainAtlasService
- Parameters:
imageSeries
- image series- Returns:
- collection of images
-
getSagittalImageSeries
public Collection<ImageSeries> getSagittalImageSeries(Gene gene)
Description copied from interface:AllenBrainAtlasService
Given a Gene, returns all the image series that contain sagittal images for the given gene. Each series will only contain one image from the middle of the series.- Specified by:
getSagittalImageSeries
in interfaceAllenBrainAtlasService
- Parameters:
gene
- gene to look for- Returns:
- all the image series that contain sagittal images for the given gene
-
-