Package com.agisoft.metashape
Class Chunk
java.lang.Object
com.agisoft.metashape.Chunk
A Chunk object.
- provides access to all chunk components (sensors, cameras, camera groups, markers, scale bars)
- contains data inherent to individual frames (point cloud, model, etc)
- provides access to other chunk attributes (transformation matrix, coordinate system, meta-data, etc..)
New components can be created using corresponding addXXX methods (addSensor, addCamera, addCameraGroup, addMarker, addScalebar, addFrame).
Removal of components is performed using corresponding removeXXX methods.
- provides access to all chunk components (sensors, cameras, camera groups, markers, scale bars)
- contains data inherent to individual frames (point cloud, model, etc)
- provides access to other chunk attributes (transformation matrix, coordinate system, meta-data, etc..)
New components can be created using corresponding addXXX methods (addSensor, addCamera, addCameraGroup, addMarker, addScalebar, addFrame).
Removal of components is performed using corresponding removeXXX methods.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd new camera to the chunk.Add new camera group to the chunk.Add new camera track to the chunk.addFrame()Add new frame to the chunk.Add new marker to the chunk.Add new marker to the chunk.Add new marker group to the chunk.voidaddScalebar(Camera first, Camera second) Add new scale bar to the chunk.addScalebar(Marker first, Marker second) Add new scale bar to the chunk.Add new scale bar group to the chunk.Add new sensor to the chunk.static long[]cArrayUnwrap(Chunk[] arrayWrapper) static Chunk[]cArrayWrap(long[] cArray, boolean cMemoryOwn) voiddelete()dump()Returns chunk contents in XML format.protected voidfinalize()getCamera(int key) Camera with specified key, may be null.Coordinate system used for camera reference data, may be null.getCameraGroup(int key) Camera group with specified key, may be null.int[]List of camera group keys in the chunk.List of camera groups in the chunk.int[]List of camera keys in the chunk.Expected accuracy of camera coordinates in meters.Expected accuracy of camera orientation angles in degrees.Camera[]List of Regular and Keyframe cameras in the chunk.getCameraTrack(int key) Camera track with specified key, may be null.int[]List of camera track keys in the chunk.List of camera tracks in the chunk.CIR calibration matrix, may be null.Coordinate system used for reference data.static longDefault dense point cloud for the current frame, may be null.List of dense clouds for the current frame.Default depth maps set for the current frame, may be null.List of depth maps sets for the current frame.Document container, may be null.Default elevation model for the current frame, may be null.List of elevation models for the current frame.getFrame(int key) Frame with specified key, may be null.intFrame identifier.int[]List of frame keys in the chunk.Chunk[]List of frames in the chunk.doubleImage brightness as percentage.doubleImage contrast as percentage.intgetKey()Chunk identifier.getLabel()Chunk label.getMarker(int key) Marker with specified key, may be null.Coordinate system used for marker reference data, may be null.getMarkerGroup(int key) Marker group with specified key, may be null.int[]List of marker group keys in the chunk.List of marker groups in the chunk.int[]List of marker keys in the chunk.Expected accuracy of marker coordinates in meters.doubleExpected accuracy of marker projections in pixels.Marker[]List of Regular, Vertex and Fiducial markers in the chunk.getMeta()Chunk meta data.getModel()Default model for the current frame, may be null.Model[]List of models for the current frame.Default orthomosaic for the current frame, may be null.List of orthomosaics for the current frame.Generated sparse point cloud, may be null.intPrimary channel index (-1 for default).Raster transform, may be null.Reconstruction volume selection.getScalebar(int key) Scale bar with specified key, may be null.getScalebarGroup(int key) Scale bar group with specified key, may be null.int[]List of scale bar group keys in the chunk.List of scale bar groups in the chunk.int[]List of scale bar keys in the chunk.Scalebar[]List of scale bars in the chunk.getSensor(int key) Sensor with specified key, may be null.int[]List of sensor keys in the chunk.Sensor[]List of sensors in the chunk.Shapes for the current frame, may be null.doubleExpected tie point accuracy in pixels.Default tiled model for the current frame, may be null.List of tiled models for the current frame.Transformation parameters specifying chunk location in the world coordinate system.booleanbooleanbooleanbooleanhasModel()booleanbooleanbooleanbooleanbooleanbooleanEnables/disables the chunk.booleanSelects/deselects the chunk.voidInitializes chunk contents from XML format.booleanloadReferenceExif(boolean load_rotation, boolean load_accuracy) Import camera locations from EXIF meta data.voidremoveCameraGroups(int[] keys) Remove camera groups from the chunk.voidremoveCameras(int[] keys) Remove cameras from the chunk.voidremoveCameraTracks(int[] keys) Remove camera tracks from the chunk.voidvoidvoidvoidremoveFrames(int[] keys) Remove frames from the chunk.voidremoveMarkerGroups(int[] keys) Remove marker groups from the chunk.voidremoveMarkers(int[] keys) Remove markers from the chunk.voidvoidvoidvoidremoveScalebarGroups(int[] keys) Remove scalebars from the chunk.voidremoveScalebars(int[] keys) Remove scalebars from the chunk.voidremoveSensors(int[] keys) Remove sensors from the chunk.voidvoidrenderPreview(long width, long height, Matrix4x4d transform, int point_size, Progress progress) Generate chunk preview image.voidReset reconstruction volume selector to default position.voidvoidCoordinate system used for camera reference data, may be null.voidsetCameraLocationAccuracy(Vector3d accuracy) Expected accuracy of camera coordinates in meters.voidsetCameraOrientationAccuracy(Vector3d accuracy) Expected accuracy of camera orientation angles in degrees.voidsetCirCalibration(Matrix3x3d calibration) CIR calibration matrix, may be null.voidCoordinate system used for reference data.voidsetDenseCloudKey(int key) voidsetDepthMapsKey(int key) voidsetElevationKey(int key) voidsetEnabled(boolean state) Enables/disables the chunk.voidsetImageBrightness(double brightness) Image brightness as percentage.voidsetImageContrast(double contrast) Image contrast as percentage.voidChunk label.voidCoordinate system used for marker reference data, may be null.voidsetMarkerLocationAccuracy(Vector3d accuracy) Expected accuracy of marker coordinates in meters.voidsetMarkerProjectionAccuracy(double accuracy) Expected accuracy of marker projections in pixels.voidChunk meta data.voidsetModelKey(int key) voidsetOrthomosaicKey(int key) voidsetPointCloud(PointCloud point_cloud) Generated sparse point cloud, may be null.voidsetPrimaryChannel(int channel) Primary channel index (-1 for default).voidsetRasterTransform(RasterTransform transform) Raster transform, may be null.voidReconstruction volume selection.voidsetSelected(boolean state) Selects/deselects the chunk.voidShapes for the current frame, may be null.voidsetTiepointProjectionAccuracy(double accuracy) Expected tie point accuracy in pixels.voidsetTiledModelKey(int key) voidsetTransform(Transform transform) Transformation parameters specifying chunk location in the world coordinate system.voidthinPointCloud(int point_limit) Remove excessive tracks from the point cloud.voidupdateCirCalibration(Progress progress) Estimate CIR calibration matrix.voidUpdate chunk transformation based on reference data.
-
Field Details
-
swigCMemOwn
protected transient boolean swigCMemOwn
-
-
Constructor Details
-
Chunk
public Chunk(long cPtr, boolean cMemoryOwn) -
Chunk
-
-
Method Details
-
getCPtr
-
finalize
protected void finalize() -
delete
public void delete() -
cArrayUnwrap
-
cArrayWrap
-
dump
Returns chunk contents in XML format. -
load
Initializes chunk contents from XML format. -
getKey
public int getKey()Chunk identifier. -
getFrameKey
public int getFrameKey()Frame identifier. -
getDocument
Document container, may be null. -
setLabel
Chunk label. -
getLabel
Chunk label. -
setEnabled
public void setEnabled(boolean state) Enables/disables the chunk. -
isEnabled
public boolean isEnabled()Enables/disables the chunk. -
setSelected
public void setSelected(boolean state) Selects/deselects the chunk. -
isSelected
public boolean isSelected()Selects/deselects the chunk. -
getFrames
List of frames in the chunk. -
getSensors
List of sensors in the chunk. -
getCameraGroups
List of camera groups in the chunk. -
getMarkerGroups
List of marker groups in the chunk. -
getScalebarGroups
List of scale bar groups in the chunk. -
getCameras
List of Regular and Keyframe cameras in the chunk. -
getMarkers
List of Regular, Vertex and Fiducial markers in the chunk. -
getScalebars
List of scale bars in the chunk. -
getCameraTracks
List of camera tracks in the chunk. -
getFrameKeys
public int[] getFrameKeys()List of frame keys in the chunk. -
getSensorKeys
public int[] getSensorKeys()List of sensor keys in the chunk. -
getCameraGroupKeys
public int[] getCameraGroupKeys()List of camera group keys in the chunk. -
getMarkerGroupKeys
public int[] getMarkerGroupKeys()List of marker group keys in the chunk. -
getScalebarGroupKeys
public int[] getScalebarGroupKeys()List of scale bar group keys in the chunk. -
getCameraKeys
public int[] getCameraKeys()List of camera keys in the chunk. -
getMarkerKeys
public int[] getMarkerKeys()List of marker keys in the chunk. -
getScalebarKeys
public int[] getScalebarKeys()List of scale bar keys in the chunk. -
getCameraTrackKeys
public int[] getCameraTrackKeys()List of camera track keys in the chunk. -
getFrame
Frame with specified key, may be null. -
getSensor
Sensor with specified key, may be null. -
getCameraGroup
Camera group with specified key, may be null. -
getMarkerGroup
Marker group with specified key, may be null. -
getScalebarGroup
Scale bar group with specified key, may be null. -
getCamera
Camera with specified key, may be null. -
getMarker
Marker with specified key, may be null. -
getScalebar
Scale bar with specified key, may be null. -
getCameraTrack
Camera track with specified key, may be null. -
addFrame
Add new frame to the chunk. -
addSensor
Add new sensor to the chunk. -
addCameraGroup
Add new camera group to the chunk. -
addMarkerGroup
Add new marker group to the chunk. -
addScalebarGroup
Add new scale bar group to the chunk. -
addCamera
Add new camera to the chunk. -
addMarker
Add new marker to the chunk. -
addCameraTrack
Add new camera track to the chunk. -
addMarker
Add new marker to the chunk.- Parameters:
point- Point to initialize marker projections.visibility- Enables visibility check during projection assignment.- Returns:
- Created marker.
-
addScalebar
Add new scale bar to the chunk.- Parameters:
first- First endpoint.second- Second endpoint.- Returns:
- Created scale bar.
-
addScalebar
Add new scale bar to the chunk.- Parameters:
first- First endpoint.second- Second endpoint.- Returns:
- Created scale bar.
-
removeFrames
public void removeFrames(int[] keys) Remove frames from the chunk.- Parameters:
keys- List of frame keys to remove.
-
removeSensors
public void removeSensors(int[] keys) Remove sensors from the chunk.- Parameters:
keys- List of sensor keys to remove.
-
removeCameraGroups
public void removeCameraGroups(int[] keys) Remove camera groups from the chunk.- Parameters:
keys- List of camera group keys to remove.
-
removeMarkerGroups
public void removeMarkerGroups(int[] keys) Remove marker groups from the chunk.- Parameters:
keys- List of marker group keys to remove.
-
removeScalebarGroups
public void removeScalebarGroups(int[] keys) Remove scalebars from the chunk.- Parameters:
keys- List of scalebar group keys to remove.
-
removeCameras
public void removeCameras(int[] keys) Remove cameras from the chunk.- Parameters:
keys- List of camera keys to remove.
-
removeMarkers
public void removeMarkers(int[] keys) Remove markers from the chunk.- Parameters:
keys- List of marker keys to remove.
-
removeScalebars
public void removeScalebars(int[] keys) Remove scalebars from the chunk.- Parameters:
keys- List of scalebar keys to remove.
-
removeCameraTracks
public void removeCameraTracks(int[] keys) Remove camera tracks from the chunk.- Parameters:
keys- List of camera track keys to remove.
-
setCoordinateSystem
Coordinate system used for reference data. -
getCoordinateSystem
Coordinate system used for reference data. -
setCameraCoordinateSystem
Coordinate system used for camera reference data, may be null. -
getCameraCoordinateSystem
Coordinate system used for camera reference data, may be null. -
setMarkerCoordinateSystem
Coordinate system used for marker reference data, may be null. -
getMarkerCoordinateSystem
Coordinate system used for marker reference data, may be null. -
setTransform
Transformation parameters specifying chunk location in the world coordinate system. -
getTransform
Transformation parameters specifying chunk location in the world coordinate system. -
resetTransform
public void resetTransform() -
hasTransform
public boolean hasTransform() -
updateTransform
public void updateTransform()Update chunk transformation based on reference data. -
setRegion
Reconstruction volume selection. -
getRegion
Reconstruction volume selection. -
resetRegion
public void resetRegion()Reset reconstruction volume selector to default position. -
setCirCalibration
CIR calibration matrix, may be null. -
getCirCalibration
CIR calibration matrix, may be null. -
updateCirCalibration
Estimate CIR calibration matrix. -
setRasterTransform
Raster transform, may be null. -
getRasterTransform
Raster transform, may be null. -
setCameraLocationAccuracy
Expected accuracy of camera coordinates in meters. -
getCameraLocationAccuracy
Expected accuracy of camera coordinates in meters. -
setCameraOrientationAccuracy
Expected accuracy of camera orientation angles in degrees. -
getCameraOrientationAccuracy
Expected accuracy of camera orientation angles in degrees. -
setMarkerLocationAccuracy
Expected accuracy of marker coordinates in meters. -
getMarkerLocationAccuracy
Expected accuracy of marker coordinates in meters. -
setMarkerProjectionAccuracy
public void setMarkerProjectionAccuracy(double accuracy) Expected accuracy of marker projections in pixels. -
getMarkerProjectionAccuracy
public double getMarkerProjectionAccuracy()Expected accuracy of marker projections in pixels. -
setTiepointProjectionAccuracy
public void setTiepointProjectionAccuracy(double accuracy) Expected tie point accuracy in pixels. -
getTiepointProjectionAccuracy
public double getTiepointProjectionAccuracy()Expected tie point accuracy in pixels. -
setPrimaryChannel
public void setPrimaryChannel(int channel) Primary channel index (-1 for default). -
getPrimaryChannel
public int getPrimaryChannel()Primary channel index (-1 for default). -
setImageBrightness
public void setImageBrightness(double brightness) Image brightness as percentage. -
getImageBrightness
public double getImageBrightness()Image brightness as percentage. -
setImageContrast
public void setImageContrast(double contrast) Image contrast as percentage. -
getImageContrast
public double getImageContrast()Image contrast as percentage. -
hasPointCloud
public boolean hasPointCloud() -
hasDenseCloud
public boolean hasDenseCloud() -
hasDepthMaps
public boolean hasDepthMaps() -
hasModel
public boolean hasModel() -
hasTiledModel
public boolean hasTiledModel() -
hasElevation
public boolean hasElevation() -
hasOrthomosaic
public boolean hasOrthomosaic() -
hasShapes
public boolean hasShapes() -
setPointCloud
Generated sparse point cloud, may be null. -
getPointCloud
Generated sparse point cloud, may be null. -
getDenseCloud
Default dense point cloud for the current frame, may be null. -
getDepthMaps
Default depth maps set for the current frame, may be null. -
getModel
Default model for the current frame, may be null. -
getTiledModel
Default tiled model for the current frame, may be null. -
getElevation
Default elevation model for the current frame, may be null. -
getOrthomosaic
Default orthomosaic for the current frame, may be null. -
setShapes
Shapes for the current frame, may be null. -
getShapes
Shapes for the current frame, may be null. -
removePointCloud
public void removePointCloud() -
removeDenseCloud
public void removeDenseCloud() -
removeDepthMaps
public void removeDepthMaps() -
removeModel
public void removeModel() -
removeTiledModel
public void removeTiledModel() -
removeElevation
public void removeElevation() -
removeOrthomosaic
public void removeOrthomosaic() -
removeShapes
public void removeShapes() -
getDepthMapsSets
List of depth maps sets for the current frame. -
getDenseClouds
List of dense clouds for the current frame. -
getModels
List of models for the current frame. -
getTiledModels
List of tiled models for the current frame. -
getElevations
List of elevation models for the current frame. -
getOrthomosaics
List of orthomosaics for the current frame. -
setDepthMapsKey
public void setDepthMapsKey(int key) -
setDenseCloudKey
public void setDenseCloudKey(int key) -
setModelKey
public void setModelKey(int key) -
setTiledModelKey
public void setTiledModelKey(int key) -
setElevationKey
public void setElevationKey(int key) -
setOrthomosaicKey
public void setOrthomosaicKey(int key) -
setMeta
Chunk meta data. -
getMeta
Chunk meta data. -
loadReferenceExif
public boolean loadReferenceExif(boolean load_rotation, boolean load_accuracy) Import camera locations from EXIF meta data.- Parameters:
load_rotation- Load yaw, pitch and roll orientation angles.load_accuracy- Load camera location accuracy.
-
addPhotos
-
thinPointCloud
public void thinPointCloud(int point_limit) Remove excessive tracks from the point cloud.- Parameters:
point_limit- Maximum number of points for each photo.
-
renderPreview
public Image renderPreview(long width, long height, Matrix4x4d transform, int point_size, Progress progress) Generate chunk preview image.- Parameters:
width- Preview image width.height- Preview image height.transform- 4x4 viewpoint transformation matrix.point_size- Point size.- Returns:
- Preview image.
-