ARCHIVED : OBSOLETE AND REPLACED BY https://github.com/bigdataviewer/bigdataviewer-playground
- Use SciJava Command, and BDVHandle objects, according to the initial discussion here: https://forum.image.sc/t/getting-bigdataviewer-instance-in-an-imagej-command/21110
- List of command located in this readme file
- Documentation on imagej.net : https://imagej.net/Bigdataviewer_Scijava
- Simple https://www.youtube.com/watch?v=-q5qIdH9Idw (1 minute)
- IJ Script example https://youtu.be/IjIW5bOn4P8 (3 minutes)
- Procedural + Warping + Export (xml hdf5 and ImagePlus) https://youtu.be/uOYWn7tUsf0 (7 minutes)
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...
- [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
- [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
- [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
- [String] bdvh:Name of the Bdv Window
- [ConvertService] cs:
BigDataBrowser
BigDataBrowserPlugInSciJava [BDV_SciJava>Browse BigDataServer (SciJava)]
- [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.
- [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.
- [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.
- [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.
- [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
- [BdvHandle] bdv_h:Bdv Window
- [GuavaWeakCacheService] cs:
- [String] locationName:Label for current Bdv Location
- [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
- [BdvHandle] bdvh:Bdv Window
- [ObjectService] os:
- [String] windowTitle:New Bdv Window Title
- [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
- [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!
- [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
- [BdvHandle] hMaster:Master Bdv Window
- [BdvHandle] hSlave:Slave Bdv Window
- [int] syncDelayInMs:Synchronization delay (ms)
- [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
- [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
- [BdvHandle] bdvh:Input Bdv Window
- [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
- [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:
- [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
- [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
- [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.
- [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
- [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.
- [String] stringMatrix:Affine Transform Matrix
- [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
- [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
- [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
- [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
- [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
- [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:
- [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
- [BdvHandle] bdv_h:
- [ImagePlus] curr:
- [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)
- [BdvHandle] bdv_h:BigDataViewer Frame
- [ImgPlus] img:
- [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.
- [BdvHandle] bdv_h:
- [GuavaWeakCacheService] cs:
- [AbstractSpimData] spimData:Input Spimdataset
- [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.
- [BdvHandle] bdv_h:BigDataViewer Frame
- [File] file:Image File
- [String] sourceIndexString:Source indexes ('2,3:5'), starts at 0
- [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)
- [BdvHandle] bdv_h:BigDataViewer Frame
- [BdvHandle] bdv_h:BigDataViewer Frame
GrayWave3DSampleCommand [BDV_SciJava>Bdv>Put Sources>Samples>Bdv example source - Wave 3D (Gray)]
Procedurally generated wave3d image, gray levels.
- [BdvHandle] bdv_h:BigDataViewer Frame
- [ConvertService] cs:
- [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
- [BdvHandle] bdv_h:BigDataViewer Frame
- [String] choice:LUT name
- [ConvertService] cs:
- [LUTService] lutService:
- [ColorTable] table:LUT
- [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.
- [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
- [BdvHandle] bdv_h:BigDataViewer Frame
Wave3DSampleCommand [BDV_SciJava>Bdv>Put Sources>Samples>Bdv example source - Wave 3D]
Procedurally generated wave3d image, with a lookuptable.
- [BdvHandle] bdv_h:BigDataViewer Frame
- [String] choice:LUT name
- [ConvertService] cs:
- [LUTService] lutService:
- [ColorTable] table:LUT
- [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.
- [String] datasetName:Dataset Name
- [String] urlServer:Big Data Server URL
- [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.
- [BdvHandle] bdv_h:BigDataViewer Frame
- [boolean] createNewWindow:Open in new BigDataViewer window
- [GuavaWeakCacheService] cs:
- [File] file:Imaris File
- [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.
- [File] file:XML File
- [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
- [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
- [GuavaWeakCacheService] cs:
- [AbstractSpimData] spimData:
- [int] timePoint: