Package sc.fiji.snt.io
Class NeuroMorphoLoader
java.lang.Object
sc.fiji.snt.io.NeuroMorphoLoader
- All Implemented Interfaces:
RemoteSWCLoader
Importer for retrieving SWC data from neuromorpho.org.
- Author:
- Tiago Ferreira
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidenableSourceVersion(boolean enable) Enables or disables the use of source version URLs.static TreeConvenience method for retrieving SWC data,Gets the SWC data ('CNG version') associated with the specified cell ID as a readergetReconstructionURL(String cellId) Gets the URL of the SWC file ('CNG version') associated with the specified cell ID.Gets the collection of Paths for the specified cell IDbooleanChecks whether a connection to the NeuroMorpho database can be established.static void
-
Constructor Details
-
NeuroMorphoLoader
public NeuroMorphoLoader()
-
-
Method Details
-
isDatabaseAvailable
public boolean isDatabaseAvailable()Checks whether a connection to the NeuroMorpho database can be established.- Specified by:
isDatabaseAvailablein interfaceRemoteSWCLoader- Returns:
- true, if an HHTP connection could be established, false otherwise
-
getReconstructionURL
Gets the URL of the SWC file ('CNG version') associated with the specified cell ID.- Specified by:
getReconstructionURLin interfaceRemoteSWCLoader- Parameters:
cellId- the ID of the cell to be retrieved- Returns:
- the reconstruction URL, or null if cell ID was not found or could not be retrieved
-
getReader
Gets the SWC data ('CNG version') associated with the specified cell ID as a reader- Specified by:
getReaderin interfaceRemoteSWCLoader- Parameters:
cellId- the ID of the cell to be retrieved- Returns:
- the character stream containing the data, or null if cell ID was not found or could not be retrieved
-
enableSourceVersion
public void enableSourceVersion(boolean enable) Enables or disables the use of source version URLs.- Parameters:
enable- true to enable source version URLs, false otherwise
-
getTree
Gets the collection of Paths for the specified cell ID- Specified by:
getTreein interfaceRemoteSWCLoader- Parameters:
cellId- the ID of the cell to be retrieved- Returns:
- the data ('CNG version') for the specified cell as a
Tree, or null if data could not be retrieved
-
get
Convenience method for retrieving SWC data,- Parameters:
cellId- the ID of the cell to be retrieved (case-sensitive). It may be the neuron name or its qualified filename. E.g., "cnic_002" or "cnic_002.swc" or "cnic_002.CNG.swc". By default, the standardized (CNG) version is assumed. Examples:"cnic_002" -> CNG version of neuron cnic_002 is retrieved "cnic_002.CNG.swc" -> CNG version of neuron cnic_002 is retrieved "cnic_002.swc" -> Source version of neuron cnic_002 is retrieved- Returns:
- the specified neuron as a
Treeobject, or null if data could not be retrieved - Throws:
IOException- if an error occurs while retrieving the data
-
main
- Throws:
IOException
-