Skip to content

Commit

Permalink
marked all _v2 classes as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristian Goina committed Apr 12, 2024
1 parent 16b43a1 commit 0c36c31
Show file tree
Hide file tree
Showing 71 changed files with 115 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package org.janelia.colormipsearch.api_v2;

/**
* @see org.janelia.colormipsearch.model.FileType
*/
@Deprecated
public enum FileType {
SignalMip("_1_raw.png"),
SignalMipMasked("_2_masked_raw.png"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

@Deprecated
public class Results<T> {
@JsonProperty
public final T results;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Deprecated
public class Utils {
private static final Logger LOG = LoggerFactory.getLogger(Utils.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

@Deprecated
@JsonInclude(JsonInclude.Include.NON_NULL)
public abstract class AbstractMetadata implements Serializable {
private String id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

@Deprecated
public class MIPIdentifier {
private final String id;
private final String publishedName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.janelia.colormipsearch.imageprocessing.ImageArray;

/**
* @see org.janelia.colormipsearch.mips.NeuronMIP
*/
@Deprecated
public class MIPImage implements Serializable {
private final MIPMetadata mipInfo;
private final ImageArray<?> imageArray;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.janelia.colormipsearch.api_v2.cdmips;

@Deprecated
public class MIPMetadata extends AbstractMetadata {

public MIPMetadata variantAsMIP(String variant) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* @see org.janelia.colormipsearch.mips.NeuronMIPUtils
*/
@Deprecated
public class MIPsUtils {

private static final Logger LOG = LoggerFactory.getLogger(MIPsUtils.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
import java.util.function.BiPredicate;

import org.janelia.colormipsearch.imageprocessing.ImageArray;
import org.janelia.colormipsearch.imageprocessing.ImageRegionDefinition;

/**
* Common methods that can be used by various ColorDepthQuerySearchAlgorithm implementations.
* @see org.janelia.colormipsearch.cds.AbstractColorDepthSearchAlgorithm
* @param <S> score type
*/
@Deprecated
public abstract class AbstractColorDepthSearchAlgorithm<S extends ColorDepthMatchScore> implements ColorDepthSearchAlgorithm<S> {

private static class PixelPositions implements Serializable {
Expand Down Expand Up @@ -41,14 +44,14 @@ int size() {
final ImageArray<?> negQueryImage;
final PixelPositions queryPositions;
final PixelPositions negQueryPositions;
final ImageRegionGenerator ignoredRegionsProvider;
final ImageRegionDefinition ignoredRegionsProvider;
final int targetThreshold;
final double zTolerance;

protected AbstractColorDepthSearchAlgorithm(ImageArray<?> queryImage, int queryThreshold,
ImageArray<?> negQueryImage, int negQueryThreshold,
int targetThreshold, double zTolerance,
ImageRegionGenerator ignoredRegionsProvider) {
ImageRegionDefinition ignoredRegionsProvider) {
this.queryImage = queryImage;
this.negQueryImage = negQueryImage;
this.targetThreshold = targetThreshold;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.janelia.colormipsearch.api_v2.Results;
import org.janelia.colormipsearch.api_v2.cdmips.MIPIdentifier;

@Deprecated
public class CDSMatches extends Results<List<ColorMIPSearchMatchMetadata>> {

public static CDSMatches EMPTY = new CDSMatches(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

import java.io.Serializable;

/**
* @see org.janelia.colormipsearch.cds.ColorDepthMatchScore
*/
@Deprecated
public interface ColorDepthMatchScore extends Serializable {
/**
* Return the score value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
/**
* ColorMIPMaskCompare encapsulates a query image and it provides a method to search
* the enclosed query in other target images.
* @see org.janelia.colormipsearch.cds.ColorDepthSearchAlgorithm
*/
@Deprecated
public interface ColorDepthSearchAlgorithm<S extends ColorDepthMatchScore> extends Serializable {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@

/**
* Creator of a ColorMIPQuerySearch for a given mask that generates a certain score type.
* @see org.janelia.colormipsearch.cds.ColorDepthSearchAlgorithmProvider
*
* @param <S> color depth match score type
*/
@Deprecated
public interface ColorDepthSearchAlgorithmProvider<S extends ColorDepthMatchScore> extends Serializable {
/**
* @return default color depth search parameters.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.janelia.colormipsearch.imageprocessing.ColorTransformation;
import org.janelia.colormipsearch.imageprocessing.ImageArray;
import org.janelia.colormipsearch.imageprocessing.ImageProcessing;
import org.janelia.colormipsearch.imageprocessing.ImageRegionDefinition;
import org.janelia.colormipsearch.imageprocessing.ImageTransformation;
import org.janelia.colormipsearch.imageprocessing.LImage;
import org.janelia.colormipsearch.imageprocessing.LImageUtils;
Expand All @@ -11,7 +12,9 @@

/**
* Factory for a color depth search comparator.
* @see org.janelia.colormipsearch.cds.ColorDepthSearchAlgorithmProviderFactory
*/
@Deprecated
public class ColorDepthSearchAlgorithmProviderFactory {

private static final Logger LOG = LoggerFactory.getLogger(ColorDepthSearchAlgorithmProviderFactory.class);
Expand All @@ -30,7 +33,7 @@ public static ColorDepthSearchAlgorithmProvider<ColorMIPMatchScore> createPixMat
int targetThreshold,
double pixColorFluctuation,
int xyShift,
ImageRegionGenerator ignoredRegionsProvider) {
ImageRegionDefinition ignoredRegionsProvider) {
LOG.info("Create mask comparator with mirrorQuery={}, dataThreshold={}, pixColorFluctuation={}, xyShift={}",
mirrorMask, targetThreshold, pixColorFluctuation, xyShift);
return new ColorDepthSearchAlgorithmProvider<ColorMIPMatchScore>() {
Expand Down Expand Up @@ -71,7 +74,7 @@ public static ColorDepthSearchAlgorithmProvider<NegativeColorDepthMatchScore> cr
int negativeRadius,
int borderSize,
ImageArray<?> roiMaskImageArray,
ImageRegionGenerator ignoredRegionsProvider) {
ImageRegionDefinition ignoredRegionsProvider) {
if (negativeRadius <= 0) {
throw new IllegalArgumentException("The value for negative radius must be a positive integer - current value is " + negativeRadius);
}
Expand Down Expand Up @@ -135,7 +138,7 @@ public static ColorDepthSearchAlgorithmProvider<ColorMIPMatchScore> createPixMat
int xyShift,
int negativeRadius,
ImageArray<?> roiMaskImageArray,
ImageRegionGenerator ignoredRegionsProvider) {
ImageRegionDefinition ignoredRegionsProvider) {
if (negativeRadius <= 0) {
throw new IllegalArgumentException("The value for negative radius must be a positive integer - current value is " + negativeRadius);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

import org.apache.commons.lang3.StringUtils;

/**
* @see org.janelia.colormipsearch.cds.ColorDepthSearchParams
*/
@Deprecated
public class ColorDepthSearchParams implements Serializable {
private final Map<String, Object> params = new LinkedHashMap<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

/**
* ColorMIPCompareOutput represents the color depth match summary result.
* @see org.janelia.colormipsearch.cds.PixelMatchScore
*/
@Deprecated
public class ColorMIPMatchScore implements ColorDepthMatchScore {
public static ColorMIPMatchScore NO_MATCH = new ColorMIPMatchScore(0, 0, false, null);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

/**
* Creates a color depth search for a given mask.
* @see org.janelia.colormipsearch.cds.ColorMIPSearch
*/
@Deprecated
public class ColorMIPSearch implements Serializable {

private final ColorDepthSearchAlgorithmProvider<ColorMIPMatchScore> cdsAlgorithmProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.janelia.colormipsearch.api_v2.cdmips.AbstractMetadata;
import org.janelia.colormipsearch.api_v2.cdmips.MIPMetadata;

@Deprecated
@JsonClassDescription("Color Depth Search Match")
public class ColorMIPSearchMatchMetadata extends AbstractMetadata {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*
* @author <a href="mailto:[email protected]">Konrad Rokicki</a>
*/
@Deprecated
public class ColorMIPSearchResult implements Serializable {

private final MIPMetadata maskMIP;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Deprecated
public class ColorMIPSearchResultUtils {
private static final Logger LOG = LoggerFactory.getLogger(ColorMIPSearchResultUtils.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

/**
* Utils for calculating gradient area gap scores.
* This utility is only used in the commonad line tools so this clqss
* has been moved actually in the colormipsearch-tools module.
*/
@Deprecated
public class GradientAreaGapUtils {

public static final int HIGH_EXPRESSION_FACTOR = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@

/**
* This calculates the gradient area gap between an encapsulated EM mask and an LM (segmented) image.
* @see org.janelia.colormipsearch.cds.ShapeMatchColorDepthSearchAlgorithm
*/
@Deprecated
public class GradientBasedNegativeScoreColorDepthSearchAlgorithm implements ColorDepthSearchAlgorithm<NegativeColorDepthMatchScore> {

private static final Logger LOG = LoggerFactory.getLogger(GradientBasedNegativeScoreColorDepthSearchAlgorithm.class);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

import org.apache.commons.lang3.builder.ToStringBuilder;

/**
* @see org.janelia.colormipsearch.cds.ShapeMatchScore
*/
@Deprecated
public class NegativeColorDepthMatchScore implements ColorDepthMatchScore {
private final long gradientAreaGap;
private final long highExpressionArea;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@
import javax.annotation.Nonnull;

import org.janelia.colormipsearch.imageprocessing.ImageArray;
import org.janelia.colormipsearch.imageprocessing.ImageRegionDefinition;

/**
* PixelMatchColorDepthQuerySearchAlgorithm - implements the color depth mip comparison
* using internal arrays containg the positions from the mask that are above the mask threshold
* and the positions after applying the specified x-y shift and mirroring transformations.
* The mask pixels are compared against the target pixels tht
* @see org.janelia.colormipsearch.cds.PixelMatchColorDepthSearchAlgorithm
*/
@Deprecated
public class PixelMatchColorDepthSearchAlgorithm extends AbstractColorDepthSearchAlgorithm<ColorMIPMatchScore> {

private final int[][] targetMasksList;
Expand All @@ -28,7 +31,7 @@ public PixelMatchColorDepthSearchAlgorithm(ImageArray<?> queryImage, int queryTh
ImageArray<?> negQueryImage, int negQueryThreshold,
boolean mirrorNegQuery, int targetThreshold,
double zTolerance, int xyshift,
ImageRegionGenerator ignoredRegionsProvider) {
ImageRegionDefinition ignoredRegionsProvider) {
super(queryImage, queryThreshold, negQueryImage, negQueryThreshold, targetThreshold, zTolerance, ignoredRegionsProvider);
// shifting
targetMasksList = generateShiftedMasks(queryPixelPositions(), xyshift, queryImage.getWidth(), queryImage.getHeight());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import org.janelia.colormipsearch.imageprocessing.ImageArray;

@Deprecated
public class PixelMatchWithNegativeScoreColorDepthSearchAlgorithm implements ColorDepthSearchAlgorithm<ColorMIPMatchScore> {

private final Set<String> requiredVariantTypes = new LinkedHashSet<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* These are the source PPP matches as they are imported from the original matches.
* This object contains all fields currently read from the original result file.
*/
@Deprecated
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonAutoDetect(
fieldVisibility = JsonAutoDetect.Visibility.NONE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* These are the source PPP matches as they are imported from the original matches.
* This object contains all fields currently read from the original result file.
*/
@Deprecated
@JsonClassDescription("Patch per Pixel Match")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.janelia.colormipsearch.api_v2.Results;

@Deprecated
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({"maskId", "maskPublishedName", "maskLibraryName", "neuronType", "neuronInstance", "sourceMaskName", "results"})
public class EmPPPMatches extends Results<List<EmPPPMatch>> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.janelia.colormipsearch.api_v2.FileType;

@Deprecated
public enum PPPScreenshotType {
RAW(FileType.SignalMip),
MASKED_RAW(FileType.SignalMipMasked),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Deprecated
public class PPPUtils {
private static final Logger LOG = LoggerFactory.getLogger(PPPUtils.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* This is the published PPP match. It is very similar with the source PPP match
* but without internal fields that we do not to want to expose.
*/
@Deprecated
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"id", "publishedName", "libraryName",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Deprecated
public class RawPPPMatchesReader {
private static final Logger LOG = LoggerFactory.getLogger(RawPPPMatchesReader.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import org.apache.commons.lang3.builder.ToStringBuilder;

@Deprecated
class RawSkeletonMatches {
@JsonProperty("skel_ids")
private String bestSkeletonIds;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import org.apache.commons.lang3.builder.ToStringBuilder;

@Deprecated
@JsonInclude(JsonInclude.Include.NON_NULL)
public class SourceSkeletonMatch {
private String id;
Expand Down
Loading

0 comments on commit 0c36c31

Please sign in to comment.