Skip to content

Commit

Permalink
Fix javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
tomburke-rse committed Sep 9, 2021
1 parent bda6432 commit b0dffc0
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 7 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[![Java CI with Maven](https://github.com/Labelings/Labeling/actions/workflows/maven.yml/badge.svg)](https://github.com/Labelings/Labeling/actions/workflows/maven.yml)

[![](https://github.com/Labelings/Labeling/actions/workflows/build-main.yml/badge.svg)](https://github.com/Labelings/Labeling/actions/workflows/build-main.yml)

# Labeling
Expand Down
19 changes: 18 additions & 1 deletion src/main/java/net/imglib2/labeling/LabelingIOService.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,11 @@ public interface LabelingIOService extends ImageJService {
*
* @param file The path to the file
* @param codecs One or more codecs necessary to convert the data to clazz.
* @param metadataClazz the metadata class
* @param <T> the label value
* @param <I> IntegerType for the pixel value
* @param <S> Class of the meta data
* @throws IOException on file read fail
* @return a container object holding the ImgLabeling (as well as an optional source mapping)
*/
<S, T, I extends IntegerType<I>> Container<S, T, I> loadWithMetadata(String file, Class<S> metadataClazz, Codec<?>... codecs) throws IOException;
Expand All @@ -82,9 +85,12 @@ public interface LabelingIOService extends ImageJService {
*
* @param file The path to the file
* @param clazz The class to convert the contains of the file to
* @param metadataClazz the metadata class
* @param codecs One or more codecs necessary to convert the data to clazz.
* @param <T> the label value
* @param <I> IntegerType for the pixel value
* @param <S> Class of the meta data
* @throws IOException on file read fail
* @return a container object holding the ImgLabeling (as well as an optional source mapping)
*/
<S, T, I extends IntegerType<I>> Container<S, T, I> loadWithMetadata(String file, Class<T> clazz, Class<S> metadataClazz, Codec<?>... codecs) throws IOException;
Expand All @@ -94,9 +100,13 @@ public interface LabelingIOService extends ImageJService {
* The file path must point to the bson file containing the labeling data.
*
* @param file The path to the file
* @param idToLabel a function transforming the label of type <T> into something else
* @param idToLabel a function transforming the label of type T into something else
* @param metadataClazz the metadata class
* @param codecs One or more codecs necessary to convert the data to clazz.
* @param <T> the label value
* @param <I> IntegerType for the pixel value
* @param <S> Class of the meta data
* @throws IOException on file read fail
* @return a container object holding the ImgLabeling (as well as an optional source mapping)
*/
<S, T, I extends IntegerType<I>> Container<S, T, I> loadWithMetadata(String file, LongFunction<T> idToLabel, Class<S> metadataClazz, Codec<?>... codecs) throws IOException;
Expand All @@ -108,8 +118,10 @@ public interface LabelingIOService extends ImageJService {
* @param codecs one or more codecs to convert clazz into something bsonifyable
* @param container the container with the ImgLabeling and a metadata object
* @param file the path pointing to the file, including the filename
* @param metadataClazz the metadata class
* @param <T> the label value
* @param <I> IntegerType for the pixel value
* @param <S> Class of the meta data
*/
<S, T, I extends IntegerType<I>> void saveWithMetaData(Container<S, T, I> container, String file, Class<S> metadataClazz, Codec<?>... codecs);

Expand All @@ -121,8 +133,10 @@ public interface LabelingIOService extends ImageJService {
* @param codecs one or more codecs to convert clazz into something bsonifyable
* @param container the container with the ImgLabeling and a metadata object
* @param file the path pointing to the file, including the filename
* @param metadataClazz the metadata class
* @param <T> the label value
* @param <I> IntegerType for the pixel value
* @param <S> Class of the meta data
*/
<S, T, I extends IntegerType<I>> void saveWithMetaData(Container<S, T, I> container, String file, Class<T> clazz, Class<S> metadataClazz, Codec<?>... codecs);

Expand All @@ -132,9 +146,12 @@ public interface LabelingIOService extends ImageJService {
*
* @param labelToId a function to convert the type T to a long value.
* @param container the container with the ImgLabeling and a metadata object
* @param codecs one or more codecs to convert clazz into something bsonifyable
* @param file the path pointing to the file, including the filename
* @param metadataClazz the metadata class
* @param <T> the label value
* @param <I> IntegerType for the pixel value
* @param <S> Class of the meta data
*/
<S, T, I extends IntegerType<I>> void saveWithMetaData(Container<S, T, I> container, String file, ToLongFunction<T> labelToId, Class<S> metadataClazz, Codec<?>... codecs);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ public Builder<T, I> setLabelToId(final ToLongFunction<T> labelToId) {
/**
*
* @param file the fully qualified path to the file
* @return a Builder for a LabelingMappingCodec
*/
public Builder<T, I> setFile(Path file) {
this.file = file;
Expand All @@ -392,7 +393,8 @@ public Builder<T, I> setFile(Path file) {

/**
* Set the datasetIO Service to use. Can be accessed through the current context.
* @param datasetIOService
* @param datasetIOService a scijava dataetIOService gotten through the context
* @return a Builder for a LabelingMappingCodec
*/
public Builder<T, I> setDatasetIOService(DatasetIOService datasetIOService) {
this.datasetIOService = datasetIOService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ public Builder<S, T, I> setLabelToId(final ToLongFunction<T> labelToId) {
/**
*
* @param file the fully qualified path to the file
* @return a Builder for a LabelingMappingCodec
*/
public Builder<S, T, I> setFile(Path file) {
this.file = file;
Expand All @@ -396,7 +397,8 @@ public Builder<S, T, I> setFile(Path file) {

/**
* Set the datasetIO Service to use. Can be accessed through the current context.
* @param datasetIOService
* @param datasetIOService the datasetIO Service to use
* @return a Builder for a LabelingMappingCodec
*/
public Builder<S, T, I> setDatasetIOService(DatasetIOService datasetIOService) {
this.datasetIOService = datasetIOService;
Expand All @@ -405,8 +407,8 @@ public Builder<S, T, I> setDatasetIOService(DatasetIOService datasetIOService) {

/**
* the class of the metadata that is contained in the file. also needs a codec to decode
* @param metadataClazz
* @return
* @param metadataClazz the metadata class to use
* @return a Builder for a LabelingMappingCodec
*/
public Builder<S, T, I> setMetadataClazz(Class<S> metadataClazz) {
this.metadataClazz = metadataClazz;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/net/imglib2/labeling/utils/LabelingUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public class LabelingUtil {
public static final String TIF_ENDING = ".tif";

/**
* @param context the scijava context used in the project
* @param filename the filename of the Img to save
* @param rai the img
* @param <T> the pixel value
Expand Down

0 comments on commit b0dffc0

Please sign in to comment.