Skip to content
This repository was archived by the owner on Dec 22, 2023. It is now read-only.
/ bigdataviewer_scijava Public archive

OBSOLETE replaced by bigdataviewer playground - Scijava commands for starting BigDataViewer and exporting data.

Notifications You must be signed in to change notification settings

BIOP/bigdataviewer_scijava

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ARCHIVED : OBSOLETE AND REPLACED BY https://github.com/bigdataviewer/bigdataviewer-playground

Fiji plugins for starting BigDataViewer and exporting data, scijava-friendly.

Project goal:

Documentation:

Demo video:

  1. Simple https://www.youtube.com/watch?v=-q5qIdH9Idw (1 minute)
  2. IJ Script example https://youtu.be/IjIW5bOn4P8 (3 minutes)
  3. Procedural + Warping + Export (xml hdf5 and ImagePlus) https://youtu.be/uOYWn7tUsf0 (7 minutes)

List of all commands of the repository

Inspect sources

BdvSourcesInspect [BDV_SciJava>Bdv>Inspect BDV Sources]

Prints in the console informations about a bdv source. Looks recursively through wrapped sources in order to understand the logic behind a source which could have been loaded from a dataset, affinetransformed, warped, affinetransformed again...

Input

  • [BdvHandle] bdvh:Input Bdv Window
  • [boolean] getFullInformations:
  • [String] sourceIndexString:Indexes ('0,3:5'), of the sources to inspect
  • [int] timepoint:
Create/close bdv window

BdvWindowCreate [BDV_SciJava>Bdv>Create Empty BDV Frame]

Creates an empty Bdv window

Input

  • [GuavaWeakCacheService] cacheService:
  • [boolean] is2D:Create a 2D Bdv window
  • [ObjectService] os:
  • [double] px:Location and size of the view of the new Bdv window
  • [double] py:Location and size of the view of the new Bdv window
  • [double] pz:Location and size of the view of the new Bdv window
  • [double] s:Location and size of the view of the new Bdv window
  • [String] windowTitle:Title of the new Bdv window

Output

  • [BdvHandle] bdvh:

BdvWindowClose [BDV_SciJava>Bdv>Display>Close Bdv Window]

Close Bdv Window Scijava Command which closes a BdvHandle window The convert service is used to find the BdvHandle from its String representation. Valid Strings are:

  • the title of the JFrame containing the ViewerPanel of the BdvHandle Object
  • the result of the toString() method of the BdvHandle Object (= default SciJava name) -> Assumes the Bdv is containing within a single JFrame

Input

  • [String] bdvh:Name of the Bdv Window
  • [ConvertService] cs:
BigDataBrowser

BigDataBrowserPlugInSciJava [BDV_SciJava>Browse BigDataServer (SciJava)]

Input

  • [CommandService] cs:
  • [LogService] ls:
  • [String] serverUrl:
BigDataViewer sources display commands

BdvSourcesHide [BDV_SciJava>Bdv>Display>Hide Sources]

Hide bdv sources Hide bdv sources. Multiple sources can be specified.

Input

  • [BdvHandle] bdvh:Bdv window
  • [String] sourceIndexString:Indexes of the sources, comma separated Multiple sources can be specified; 0,4,7 or range 3:5

BdvSourcesSetColor [BDV_SciJava>Bdv>Display>Set Sources Color]

Set the color of bdv sources Set the color of bdv sources. Multiple sources can be specified.

Input

  • [BdvHandle] bdvh:Bdv Window
  • [ColorRGB] c:Color
  • [String] sourceIndexString:Indexes ('0,3:5'), of the sources description test

BdvSourcesSetMinMax [BDV_SciJava>Bdv>Display>Set Sources Min Max Display]

Set the min and max display values of bdv sources Set the min and max display values of bdv sources. Multiple sources can be specified.

Input

  • [BdvHandle] bdvh:Bdv Window
  • [double] max:Maximum display value
  • [double] min:Minimum display value
  • [String] sourceIndexString:Indexes ('0,3:5'), of the sources to process

BdvSourcesShow [BDV_SciJava>Bdv>Display>Show Sources]

Show bdv sources Show bdv sources. Multiple sources can be specified.

Input

  • [BdvHandle] bdvh:Bdv Window
  • [String] sourceIndexString:Indexes ('0,3:5'), of the sources to process
BigDataViewer window display commands

BdvWindowGetCurrentTransform [BDV_SciJava>Bdv>Display>Get Current Location]

Get current location of Bdv window Scijava Command which returns the current transform ( = location ) of a Bdv window This correspond to storing the current view of a Bdv window Output: an AffineTransform3D object which corresponds to the current view of the input Bdv window an optional name can be given in order to label this view. The link between the name and the affine transform is stored in the cache service

Input

  • [BdvHandle] bdv_h:Bdv Window
  • [GuavaWeakCacheService] cs:
  • [String] locationName:Label for current Bdv Location

Output

  • [AffineTransform3D] at3D:AffineTransform3D object which corresponds to the current view of the bdv window

BdvWindowRename [BDV_SciJava>Bdv>Display>Rename Bdv Window]

Renames a Bdv Window Specifying a name facilitates the selection of a Bdv Window in IJ1 Macro language

Input

  • [BdvHandle] bdvh:Bdv Window
  • [ObjectService] os:
  • [String] windowTitle:New Bdv Window Title

Output

  • [BdvHandle] bdvh:Bdv Window

BdvWindowSelect [BDV_SciJava>Bdv>Display>Select Bdv Window]

Puts in front/focus a Bdv Window Useful for IJ1 Macro Language programming

Input

  • [String] bdvh:Name of the Bdv window
  • [ConvertService] cs:

BdvWindowSetCurrentTransform [BDV_SciJava>Bdv>Display>Set Current Location]

Set the location of the current view of a Bdv Window Do not check whether the new view keeps a direct orthonormal view -> take care!

Input

  • [AffineTransform3D] at3D:Affine Transform specifying the Bdv window view location
  • [BdvHandle] bdvh:Input Bdv Window

BdvWindowSynchronize [BDV_SciJava>Bdv>Display>Synchronize 2 Bdvs]

Synchronizes the location of 2 Bdv windows Synchronizes the location of 2 Bdv windows

  • One is the master = controlling the slave window
  • A thread checks every syncDelayInMs ms if the views are identical or not, if not, then the slave window is updated
  • The syncrnoization can be stopped temporarily thanke to the SwingSyncBdvHandleViewer class which is triggered
  • Synchronization can be chained to synchrnoize more than two viewers

Input

  • [BdvHandle] hMaster:Master Bdv Window
  • [BdvHandle] hSlave:Slave Bdv Window
  • [int] syncDelayInMs:Synchronization delay (ms)

Output

  • [SyncBdvHandle] sbh:

BdvWindowTranslateOnSource [BDV_SciJava>Bdv>Display>Translate Bdv Location On Source]

Translate the location of the Bdv window to the right corner of the specified indexed source Translate the location of the Bdv window to the right corner of the specified indexed source

  • No rotation or scaling is attempted to fit in a better way the specified source:
  • it is not guaranteed tha the specified source is not skewed or is in the direct orientation
  • thus it's complicated to keep a direct orthonormal referential when trying to align better the bdv window and the source

Input

  • [BdvHandle] bdvh:
  • [CommandService] cs:
  • [int] sourceIndex:
Sources edition

BdvSourcesDuplicate [BDV_SciJava>Bdv>Edit Sources>Duplicate Sources]

Duplicate sources Sources are duplicated by reference. So any modification of one of the duplicatedsource will affect all sources. One bug of this command is that the ConverterSetup isnot transfered -> It is not possible to change display settings (easily) on the duplicated source.

BdvSourcesRemove [BDV_SciJava>Bdv>Edit Sources>Remove Sources]

Remove source from a Bdv Window Removing a source can cause issue at the moment and indexation problems,especially when working with SpimData. Try to avoid this command. One optionis to create a new Bdv Window and transfer only the needed source through theBdvSourcesDuplicate command.

BigWarp

BigWarpGetTransform [BDV_SciJava>Bdv>Edit Sources>Register>Get BigWarp Transform]

Get the current transformation specified by a BigWarp instance

Input

  • [BdvHandle] bdvh:Input Bdv Window

Output

  • [RealTransform] realtransform:

BigWarpInitWithBdvSources [BDV_SciJava>Bdv>Edit Sources>Register>BigWarp (SciJava)]

Initializes BigWarp using pre existing set of SourceAndConverter Initializes BigWarp using pre existing set of SourceAndConverter

Input

  • [BdvHandle] bdv_h_fixed:Input Bdv Window containing fixed sources
  • [BdvHandle] bdv_h_moving:Input Bdv Window containing moving sources
  • [GuavaWeakCacheService] cs:
  • [String] idx_src_fixed:Fixed source indexes ('2,3:5'), starts at 0
  • [String] idx_src_moving:Moving source indexes ('2,3:5'), starts at 0
  • [ObjectService] os:

Output

  • [BdvHandle] bdvHandleP:
  • [BdvHandle] bdvHandleQ:
Sources transformations (affine, warp, resampling)

BdvSourcesAffineTransform [BDV_SciJava>Bdv>Edit Sources>Transform>Affine>Transform Sources (AffineTransform3D)]

Performs an affinetransform on bdv sources. If transformInPlace is checked, then the source is transformed in place, which means that the output can be list only. If not, the transformationis made through a wrapping whithin a TransformedSource. An AffineTransform3D object should be availablewithin ObjectService to use this command in the GUI

Input

  • [AffineTransform3D] at:Affine Transform Matrix
  • [boolean] transformInPlace:Transform the source in place = the original transform is lost

BdvSourcesAffineTransformWithString [BDV_SciJava>Bdv>Edit Sources>Transform>Affine>Transform Sources (Affine, string)]

Performs an affinetransform on bdv sources. If transformInPlace is checked, then the source is transformed in place, which means that the output can be list only. If not, the transformationis made through a wrapping whithin a TransformedSource. The affine transform is a 4x3 matrix separated with comma

Input

  • [String] stringMatrix:Affine Transform Matrix
  • [boolean] transformInPlace:Transform the source in place = the original transform is lost

BdvSourcesResample [BDV_SciJava>Bdv>Edit Sources>Transform>Resample Sources]

Resample a Bdv Source like another one This command is useful to save any sort of source which is notsampled on a grid (procedural, warped), and to resample it ontoan appropriate grid (defined by the source template). Once resampled, the sourcecan be exported as a spim Xml Dataset, for instance.

Input

  • [BdvHandle] bdv_dst:Bdv Frame containing source resampling template
  • [int] idxSourceDst:Index of the source resampling template
  • [boolean] reuseMipMaps:Reuse mipmaps of the resampling template source

BdvSourcesWarp [BDV_SciJava>Bdv>Edit Sources>Transform>Transform Sources (realtransform)]

Takes a transform (rather not affine), and applies it on specified sources If the transform is affine, it is preferable to use the BdvSourceAffineTransformcommand. If the transform is more general (like a Warping, typically an output of BigWarp), then this method can be used

Input

  • [RealTransform] rt:RealTransform object

CreateAffineTransformCommand [BDV_SciJava>Bdv>Edit Sources>Transform>Affine>New Affine Transform]

Creates an affine transform and makes it accessible for other commands Affine transform is a 4x3 matrix; elements are separated by comma.

Input

  • [String] stringMatrix:Affine Transform Matrix

Output

  • [AffineTransform3D] at3D:
Sources export (ImagePlus and Dataset)

BdvSourcesBdvViewToImagePlus [BDV_SciJava>Bdv>Export Sources>As ImagePlus]

Export a Bdv View as an ImagePlus (an AffineTransform3D is required to specify the location) Limitations : do not work with multiple ARGB source -> please loop this command Do not work with multiple source of multiple Pixel Type -> please loop this command

Input

  • [BdvHandle] bdv_h:BigDataViewer Frame
  • [boolean] ignoreSourceLut:Ignore Source LUT (check for RGB)
  • [boolean] interpolate:Interpolate
  • [int] mipmapLevel:Mipmap level, 0 for highest resolution
  • [double] samplingXYInPhysicalUnit:XY Pixel size sampling (physical unit)
  • [double] samplingZInPhysicalUnit:Z Pixel size sampling (physical unit)
  • [String] sourceIndexString:Source indexes ('2,3:5'), starts at 0
  • [int] timepoint:Timepoint
  • [AffineTransform3D] transformedSourceToViewer:BigDataViewer View (affine transform 3D)
  • [boolean] wrapMultichannelParallel:Parallelize when exporting several channels
  • [double] xSize:Physical Size X
  • [double] ySize:Physical Size Y
  • [double] zSize:Physical Size Z

Output

  • [BdvHandle] bdv_h:BigDataViewer Frame
  • [ImagePlus] imp:

BdvSourcesCurrentBdvViewToImagePlus [BDV_SciJava>Bdv>Export Sources>As ImagePlus (current view)]

Export current Bdv View as an ImagePlus Limitations : do not work with multiple ARGB source -> please loop this command Do not work with multiple source of multiple Pixel Type -> please loop this command

Input

  • [BdvHandle] bdv_h:BigDataViewer Frame
  • [boolean] ignoreSourceLut:Ignore Source LUT (check for RGB)
  • [boolean] interpolate:Interpolate
  • [boolean] matchWindowSize:Match bdv frame window size
  • [int] mipmapLevel:Mipmap level, 0 for highest resolution
  • [double] samplingXYInPhysicalUnit:XY Pixel size sampling (physical unit)
  • [double] samplingZInPhysicalUnit:Z Pixel size sampling (physical unit)
  • [String] sourceIndexString:Source indexes ('2,3:5'), starts at 0
  • [int] timepoint:Timepoint
  • [boolean] wrapMultichannelParallel:Parallelize when exporting several channels
  • [double] xSize:Physical Size X
  • [double] ySize:Physical Size Y
  • [double] zSize:Physical Size Z

Output

  • [BdvHandle] bdv_h:BigDataViewer Frame
  • [ImagePlus] imp:

BdvSourcesExportToXMLHDF5_RecomputePyramid [BDV_SciJava>Bdv>Export Sources>As Xml/Hdf5 SpimDataset]

Export a set of Sources into a new Xml/Hdf5 bdv dataset Mipmaps are recomputed. Do not work with RGB images. Other pixel types are truncated to their int value between 0 and 65535

Input

  • [boolean] autoMipMap:
  • [BdvHandle] bdvh:BigDataViewer Frame
  • [boolean] convertToUnsignedShortType:
  • [int] nThreads:
  • [int] nTimePointBegin:
  • [int] nTimePointEnd:
  • [int] scaleFactor:
  • [String] sourceIndexString:Sources to save ('2,3:5'), starts at 0
  • [int] subDivX:
  • [int] subDivY:
  • [int] subDivZ:
  • [boolean] tryMergeIntoChannelWheneverPossible:
  • [File] xmlFile:

Output

  • [AbstractSpimData] spimData:
Sources import (ImagePlus and Dataset)

BdvAppendImagePlus [BDV_SciJava>Bdv>Put Sources>Current IJ1 Image (buggy) []]

plugin to append the current image in a bdv window

Input

  • [BdvHandle] bdv_h:
  • [ImagePlus] curr:

Output

  • [BdvHandle] bdv_h:

BdvAppendImgPlus [BDV_SciJava>Bdv>Put Sources>Current IJ1 Image [ImgLib2]]

plugin to append the current image in a bdv window, using ImgLib2 wrapping (limited)

Input

  • [BdvHandle] bdv_h:BigDataViewer Frame
  • [ImgPlus] img:

Output

  • [BdvHandle] bdv_h:BigDataViewer Frame

BdvAppendSpimData [BDV_SciJava>Bdv>Put Sources>SpimDataset]

Plugin to append a spimdata dataset into a bdv window. A Spimdataset should be present in the ObjectService for this command to work. Use Spimdata commandfor that beforehand.

Input

  • [BdvHandle] bdv_h:
  • [GuavaWeakCacheService] cs:
  • [AbstractSpimData] spimData:Input Spimdataset

Output

  • [BdvHandle] bdv_h:

BdvAppendWithSciFIO [BDV_SciJava>Bdv>Put Sources>Image File [SCIFIO]]

Command which opens a file using SciFIO and appends it into in a bdv window.

Input

  • [BdvHandle] bdv_h:BigDataViewer Frame
  • [File] file:Image File
  • [String] sourceIndexString:Source indexes ('2,3:5'), starts at 0

Output

  • [BdvHandle] bdv_h:BigDataViewer Frame
Sample Sources

GrayMandelbrotCommand [BDV_SciJava>Bdv>Put Sources>Samples>Bdv example source - Fractal (Gray)]

Adds the mandelbrot set into a bdv window ( gray level between 0 and 255)

Input

  • [BdvHandle] bdv_h:BigDataViewer Frame

Output

  • [BdvHandle] bdv_h:BigDataViewer Frame

GrayWave3DSampleCommand [BDV_SciJava>Bdv>Put Sources>Samples>Bdv example source - Wave 3D (Gray)]

Procedurally generated wave3d image, gray levels.

Input

  • [BdvHandle] bdv_h:BigDataViewer Frame
  • [ConvertService] cs:

Output

  • [BdvHandle] bdv_h:BigDataViewer Frame

MandelbrotCommand [BDV_SciJava>Bdv>Put Sources>Samples>Bdv example source - Fractal ]

Adds the mandelbrot set into a bdv window with a lookuptable

Input

  • [BdvHandle] bdv_h:BigDataViewer Frame
  • [String] choice:LUT name
  • [ConvertService] cs:
  • [LUTService] lutService:
  • [ColorTable] table:LUT

Output

  • [BdvHandle] bdv_h:BigDataViewer Frame

VoronoiLabel3DCommand [BDV_SciJava>Bdv>Put Sources>Samples>Bdv example source - Voronoi Label 3D]

Random 3D points defining voronoi cells, in 3D.

Input

  • [BdvHandle] bdv_h:BigDataViewer Frame
  • [boolean] computeImageBeforeDisplay:Compute image before displaying it (avoid for big image)
  • [int] numLabels:Number of Random Points = number of voronoi cells
  • [int] sx:Number of Pixels in X
  • [int] sy:Number of Pixels in Y
  • [int] sz:Number of Pixels in Z

Output

  • [BdvHandle] bdv_h:BigDataViewer Frame

Wave3DSampleCommand [BDV_SciJava>Bdv>Put Sources>Samples>Bdv example source - Wave 3D]

Procedurally generated wave3d image, with a lookuptable.

Input

  • [BdvHandle] bdv_h:BigDataViewer Frame
  • [String] choice:LUT name
  • [ConvertService] cs:
  • [LUTService] lutService:
  • [ColorTable] table:LUT

Output

  • [BdvHandle] bdv_h:BigDataViewer Frame
SpimDataset Import and Save

SpimdatasetOpenBigDataServer [BDV_SciJava>SpimDataset>Open>SpimDataset [BigDataServer]]

Command that opens a Spimdata dataset from a BigDataServer. Click on Show to display it.

Input

  • [String] datasetName:Dataset Name
  • [String] urlServer:Big Data Server URL

Output

  • [AbstractSpimData] spimData:

SpimdatasetOpenImaris [BDV_SciJava>SpimDataset>Open>SpimDataset [Imaris File]]

Command that opens a Spimdata dataset from an Imaris file. Click on Show to display it.

Input

  • [BdvHandle] bdv_h:BigDataViewer Frame
  • [boolean] createNewWindow:Open in new BigDataViewer window
  • [GuavaWeakCacheService] cs:
  • [File] file:Imaris File

Output

  • [BdvHandle] bdv_h:BigDataViewer Frame
  • [AbstractSpimData] spimData:

SpimdatasetOpenXML [BDV_SciJava>SpimDataset>Open>SpimDataset [XML File]]

Command that opens a Spimdata dataset from a xml Spimdata file. Click on Show to display it.

Input

  • [File] file:XML File

Output

  • [AbstractSpimData] sd:

SpimdatasetSave [BDV_SciJava>SpimDataset>Save SpimDataset]

Command that saves a Spimdata dataset object Save a spimdata dataset. Manual transform can be pushed into thedataset by looking recursively through wrapped Source. Limitations are to be expected.Only pushing transformations from timepoint 0 at the moment

Input

  • [GuavaWeakCacheService] cs:
  • [boolean] pushSourceTransformationsToDataset:
  • [AbstractSpimData] spimData:
  • [File] xmlFileName:

SpimdatasetUpdateBdvWindow [BDV_SciJava>Bdv>Display>SpimDataset>Update Bdv]

Updates the associated Bdv to a Spimdataset. If the spimdata object has been modifiedthen the transformations will be updated in the Bdv Window

Input

  • [GuavaWeakCacheService] cs:
  • [AbstractSpimData] spimData:
  • [int] timePoint:

About

OBSOLETE replaced by bigdataviewer playground - Scijava commands for starting BigDataViewer and exporting data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published