Skip to content

Commit

Permalink
Fix all javadoc warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
tinevez committed Oct 8, 2023
1 parent 3e6f19e commit 697974d
Show file tree
Hide file tree
Showing 63 changed files with 532 additions and 147 deletions.
9 changes: 8 additions & 1 deletion src/main/java/fiji/plugin/trackmate/SpotMesh.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,11 @@ public SpotMesh(
* calculated from the mesh.
*
* @param quality
* the spot quality.
* @param name
* the spot name.
* @param m
* the mesh to create the spot from.
*/
public SpotMesh(
final Mesh m,
Expand Down Expand Up @@ -93,7 +96,9 @@ public SpotMesh(
* otherwise.
*
* @param ID
* the ID to create the spot with.
* @param mesh
* the mesh used to create the spot.
*/
public SpotMesh( final int ID, final BufferMesh mesh )
{
Expand Down Expand Up @@ -190,7 +195,9 @@ public void resetZSliceCache()
/**
* Returns the radius of the equivalent sphere with the same volume that of
* the specified mesh.
*
*
* @param mesh
* the mesh.
* @return the radius in physical units.
*/
public static final double radius( final Mesh mesh )
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/fiji/plugin/trackmate/SpotRoi.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,11 @@ public SpotRoi(
* otherwise.
*
* @param ID
* the ID to use when creating the spot.
* @param x
* the spot contour X coordinates.
* @param y
* the spot contour Y coordinates.
*/
public SpotRoi(
final int ID,
Expand Down
15 changes: 12 additions & 3 deletions src/main/java/fiji/plugin/trackmate/TrackMatePlugIn.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,11 @@ else if ( imp.getType() == ImagePlus.COLOR_RGB )
* launched by this plugin.
*
* @param trackmate
* the TrackMate instance.
* @param selectionModel
* the selection model.
* @param displaySettings
* the display settings.
* @return a new sequence.
*/
protected WizardSequence createSequence( final TrackMate trackmate, final SelectionModel selectionModel, final DisplaySettings displaySettings )
Expand All @@ -126,7 +129,7 @@ protected WizardSequence createSequence( final TrackMate trackmate, final Select
* {@link TrackMate} instance.
*
* @param imp
*
* the image the tracking data will be created on.
* @return a new {@link Model} instance.
*/
protected Model createModel( final ImagePlus imp )
Expand Down Expand Up @@ -161,7 +164,11 @@ protected Settings createSettings( final ImagePlus imp )
/**
* Hook for subclassers: <br>
* Creates the TrackMate instance that will be controlled in the GUI.
*
*
* @param model
* the model to create the TrackMate instance with.
* @param settings
* the settings to create the TrackMate instance with.
* @return a new {@link TrackMate} instance.
*/
protected TrackMate createTrackMate( final Model model, final Settings settings )
Expand All @@ -175,7 +182,9 @@ protected TrackMate createTrackMate( final Model model, final Settings settings
model.setPhysicalUnits( spaceUnits, timeUnits );

final TrackMate trackmate = new TrackMate( model, settings );
ObjectService objectService = TMUtils.getContext().service( ObjectService.class );

// Register it to the object service.
final ObjectService objectService = TMUtils.getContext().service( ObjectService.class );
if ( objectService != null )
objectService.addObject( trackmate );

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/fiji/plugin/trackmate/action/CTCExporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ public static String exportAll( final String exportRootFolder, final TrackMate t
* the trackmate to export.
* @param logger
* a logger to report progress.
* @throws IOException
* if there's any problem writing.
*/
public static void exportSettingsFile( final String exportRootFolder, final int saveId, final TrackMate trackmate, final Logger logger ) throws IOException
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public void execute( final TrackMate trackmate, final SelectionModel selectionMo
TMUtils.getSpatialCalibration( imp ) );
if ( whiteBackground )
{
ImageProcessor ip = imp2.getProcessor();
final ImageProcessor ip = imp2.getProcessor();
ip.invertLut();
if ( imp2.getStackSize() > 1 )
imp2.getStack().setColorModel( ip.getColorModel() );
Expand Down Expand Up @@ -153,6 +153,8 @@ public void execute( final TrackMate trackmate, final SelectionModel selectionMo
* the first frame, inclusive, to capture.
* @param last
* the last frame, inclusive, to capture.
* @param logger
* a logger instance to echo capture progress.
* @return a new ImagePlus.
*/
public static ImagePlus capture( final TrackMate trackmate, final int first, final int last, final Logger logger )
Expand Down
40 changes: 26 additions & 14 deletions src/main/java/fiji/plugin/trackmate/action/LabelImgExporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,9 @@ public static final ImagePlus createLabelImagePlus(
* the desired dimensions of the output image (width, height,
* nZSlices, nFrames) as a 4 element int array. Spots outside
* these dimensions are ignored.
* @param calibration
* the pixel size to map physical spot coordinates to pixel
* coordinates.
* @param exportSpotsAsDots
* if <code>true</code>, spots will be painted as single dots
* instead of ellipsoids.
Expand All @@ -303,10 +306,10 @@ public static final ImagePlus createLabelImagePlus(
* belonging to a track will be painted with a unique ID,
* different from the track IDs and different for each spot.
* @param useSpotIDsAsLabels
* if <code>true</code>, the label mask images will contain
* the spot ID. If <code>false</code>, the label mask images
* will contain the track ID.
*
* if <code>true</code>, the label mask images will contain the
* spot ID. If <code>false</code>, the label mask images will
* contain the track ID.
*
* @return a new {@link ImagePlus}.
*/
public static final ImagePlus createLabelImagePlus(
Expand All @@ -331,6 +334,9 @@ public static final ImagePlus createLabelImagePlus(
* the desired dimensions of the output image (width, height,
* nZSlices, nFrames) as a 4 element int array. Spots outside
* these dimensions are ignored.
* @param calibration
* the pixel size to map physical spot coordinates to pixel
* coordinates.
* @param exportSpotsAsDots
* if <code>true</code>, spots will be painted as single dots
* instead of ellipsoids.
Expand All @@ -340,9 +346,9 @@ public static final ImagePlus createLabelImagePlus(
* belonging to a track will be painted with a unique ID,
* different from the track IDs and different for each spot.
* @param useSpotIDsAsLabels
* if <code>true</code>, the label mask images will contain
* the spot ID. If <code>false</code>, the label mask images
* will contain the track ID.
* if <code>true</code>, the label mask images will contain the
* spot ID. If <code>false</code>, the label mask images will
* contain the track ID.
* @param logger
* a {@link Logger} instance, to report progress of the export
* process.
Expand Down Expand Up @@ -381,6 +387,9 @@ public static final ImagePlus createLabelImagePlus(
* the desired dimensions of the output image (width, height,
* nZSlices, nFrames) as a 4 element int array. Spots outside
* these dimensions are ignored.
* @param calibration
* the pixel size to map physical spot coordinates to pixel
* coordinates.
* @param exportSpotsAsDots
* if <code>true</code>, spots will be painted as single dots
* instead of ellipsoids.
Expand All @@ -390,10 +399,10 @@ public static final ImagePlus createLabelImagePlus(
* belonging to a track will be painted with a unique ID,
* different from the track IDs and different for each spot.
* @param useSpotIDsAsLabels
* if <code>true</code>, the label mask images will contain
* the spot ID. If <code>false</code>, the label mask images
* will contain the track ID.
*
* if <code>true</code>, the label mask images will contain the
* spot ID. If <code>false</code>, the label mask images will
* contain the track ID.
*
* @return a new {@link Img}.
*/
public static final Img< UnsignedShortType > createLabelImg(
Expand All @@ -418,6 +427,9 @@ public static final Img< UnsignedShortType > createLabelImg(
* the desired dimensions of the output image (width, height,
* nZSlices, nFrames) as a 4 element int array. Spots outside
* these dimensions are ignored.
* @param calibration
* the pixel size to map physical spot coordinates to pixel
* coordinates.
* @param exportSpotsAsDots
* if <code>true</code>, spots will be painted as single dots
* instead of ellipsoids.
Expand All @@ -427,9 +439,9 @@ public static final Img< UnsignedShortType > createLabelImg(
* belonging to a track will be painted with a unique ID,
* different from the track IDs and different for each spot.
* @param useSpotIDsAsLabels
* if <code>true</code>, the label mask images will contain
* the spot ID. If <code>false</code>, the label mask images
* will contain the track ID.
* if <code>true</code>, the label mask images will contain the
* spot ID. If <code>false</code>, the label mask images will
* contain the track ID.
* @param logger
* a {@link Logger} instance, to report progress of the export
* process.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ public interface TrackMateAction

/**
* Sets the logger that will receive logs when this action is executed.
*
* @param logger
* the logger.
*/
public void setLogger( Logger logger );
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ public default List< GapClosingParameter > getParameters()
* Performs the gap closing.
*
* @param trackmate
* the trackmate instance to operate on.
* @param logger
* a logger instance to echoes the gap-closing process.
*/
public void execute( TrackMate trackmate, Logger logger );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@ public SpotFitterPanel( final List< String > fits, final List< String > docs, fi
}

/**
* 1-based.
* Returns the selected channel. 1-based.
*
* @return
* @return the selected channel.
*/
public int getSelectedChannel()
{
Expand Down
13 changes: 11 additions & 2 deletions src/main/java/fiji/plugin/trackmate/detection/DetectionUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
import fiji.plugin.trackmate.SpotCollection;
import fiji.plugin.trackmate.TrackMate;
import fiji.plugin.trackmate.detection.util.MedianFilter2D;
import fiji.plugin.trackmate.util.Threads;
import fiji.plugin.trackmate.util.TMUtils;
import fiji.plugin.trackmate.util.Threads;
import ij.ImagePlus;
import net.imagej.ImgPlus;
import net.imagej.axis.Axes;
Expand Down Expand Up @@ -271,6 +271,8 @@ public static final Img< FloatType > createLoGKernel( final double radius, final
* @return a new float Img. Careful: even if the specified interval does not
* start at (0, 0), the new image will have its first pixel at
* coordinates (0, 0).
* @param <T>
* the pixel type of the input image.
*/
public static final < T extends RealType< T > > Img< FloatType > copyToFloatImg( final RandomAccessible< T > img, final Interval interval, final ImgFactory< FloatType > factory )
{
Expand Down Expand Up @@ -323,7 +325,14 @@ public static final Interval squeeze( final Interval interval )
}

/**
* Apply a simple 3x3 median filter to the target image.
* Applies a simple 3x3 median filter to the target image.
*
* @param <R>
* the pixel type in the image.
* @param image
* the image to filter.
* @return the filtered image, as a new image, or <code>null</code> if there
* was a problem during processing.
*/
public static final < R extends RealType< R > & NativeType< R > > Img< R > applyMedianFilter( final RandomAccessibleInterval< R > image )
{
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/fiji/plugin/trackmate/detection/MaskUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,14 @@ public static < R extends IntegerType< R > > List< Spot > fromLabeling(

/**
* Creates spots by thresholding a grayscale image. A spot is created for
* each connected-component object in the thresholded input, with a size that
* matches the mask size. The quality of the spots is read from another
* each connected-component object in the thresholded input, with a size
* that matches the mask size. The quality of the spots is read from another
* image, by taking the max pixel value of this image with the ROI.
*
* @param <T>
* the type of the input image. Must be real, scalar.
* the pixel type of the input image. Must be real, scalar.
* @param <R>
* the pixel type of the quality image. Must be real, scalar.
* @param input
* the input image.
* @param interval
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
* @author Jean-Yves Tinevez, 2023
*
* @param <T>
* the pixel type in the image processed.
*/
public class Process2DZ< T extends RealType< T > & NativeType< T > >
extends MultiThreadedBenchmarkAlgorithm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
* @author Jean-Yves Tinevez
*
* @param <T>
* the pixel type in the image processed by the detector.
*/
public interface SpotDetectorFactory< T extends RealType< T > & NativeType< T > > extends SpotDetectorFactoryBase< T >
{
Expand All @@ -53,6 +54,7 @@ public interface SpotDetectorFactory< T extends RealType< T > & NativeType< T >
* then the interval must be 3D).
* @param frame
* the frame index in the source image to operate on
* @return a new detector.
*/
public SpotDetector< T > getDetector( final Interval interval, int frame );
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,25 +65,31 @@ public interface SpotDetectorFactoryBase< T extends RealType< T > & NativeType<
* @see #setTarget(ImgPlus, Map)
* @see #marshall(Map, Element)
* @see #unmarshall(Element, Map)
* @return an error message.
*/
public String getErrorMessage();

/**
* Marshalls a settings map to a JDom element, ready for saving to XML. The
* Marshals a settings map to a JDom element, ready for saving to XML. The
* element is <b>updated</b> with new attributes.
* <p>
* Only parameters specific to the specific detector factory are marshalled.
* The element also always receive an attribute named
* {@value DetectorKeys#XML_ATTRIBUTE_DETECTOR_NAME} that saves the target
* {@link SpotDetectorFactory} key.
*
* @param settings
* the settings map to marshal.
* @param element
* the element to marshal to.
* @return <code>true</code> if marshalling was successful. If not, check
* {@link #getErrorMessage()}
*
*/
public boolean marshall( final Map< String, Object > settings, final Element element );

/**
* Un-marshalls a JDom element to update a settings map.
* Un-marshals a JDom element to update a settings map.
*
* @param element
* the JDom element to read from.
Expand All @@ -106,6 +112,7 @@ public interface SpotDetectorFactoryBase< T extends RealType< T > & NativeType<
* @param model
* the current model, used to get info to display on the GUI
* panel.
* @return a new configuration panel.
*/
public ConfigurationPanel getDetectorConfigurationPanel( final Settings settings, final Model model );

Expand All @@ -118,7 +125,7 @@ public interface SpotDetectorFactoryBase< T extends RealType< T > & NativeType<
public Map< String, Object > getDefaultSettings();

/**
* Check that the given settings map is suitable for target detector.
* Checks that the given settings map is suitable for target detector.
*
* @param settings
* the map to test.
Expand All @@ -127,8 +134,8 @@ public interface SpotDetectorFactoryBase< T extends RealType< T > & NativeType<
public boolean checkSettings( final Map< String, Object > settings );

/**
* Return <code>true</code> for the detectors that can provide a spot with a
* 2D <code>SpotRoi</code> when they operate on 2D images.
* Returns <code>true</code> for the detectors that can provide a spot with
* a 2D <code>SpotRoi</code> when they operate on 2D images.
* <p>
* This flag may be used by clients to exploit the fact that the spots
* created with this detector will have a contour that can be used
Expand All @@ -145,8 +152,8 @@ public default boolean has2Dsegmentation()
}

/**
* Return <code>true</code> for the detectors that can provide a spot with a
* 3D <code>SpotMesh</code> when they operate on 3D images.
* Returns <code>true</code> for the detectors that can provide a spot with
* a 3D <code>SpotMesh</code> when they operate on 3D images.
* <p>
* This flag may be used by clients to exploit the fact that the spots
* created with this detector will have a 3D mesh that can be used
Expand Down
Loading

0 comments on commit 697974d

Please sign in to comment.