import "Imaris.idl";
Public Types | |
| typedef enum ISurfaces::tPlaneOrientation | tPlaneOrientation |
| enum | tPlaneOrientation { eOrientationYZ = 0, eOrientationXZ = 1, eOrientationXY = 2 } |
Public Member Functions | |
| HRESULT | AddSurface ([in] VARIANT aVertices,[in] VARIANT aTriangles,[in] VARIANT aNormals,[in, defaultvalue(0)] ULONG aTimeIndex) |
| HRESULT | AddSurfacesList ([in] VARIANT aVertices,[in] VARIANT aNumberOfVerticesPerSurface,[in] VARIANT aTriangles,[in] VARIANT aNumberOfTrianglesPerSurface,[in] VARIANT aNormals,[in] VARIANT aTimeIndexPerSurface) |
| HRESULT | GetCenterOfMass ([in] ULONG aSurfaceIndex,[out, retval] VARIANT *aPositionXYZ) |
| HRESULT | GetContourPlaneOrientation ([out, retval] tPlaneOrientation *aOrientation) |
| HRESULT | GetContourPlanePosition ([in] ULONG aPlaneIndex,[out, retval] FLOAT *aPlanePosition) |
| HRESULT | GetContourVertices ([in] ULONG aPlaneIndex,[out] VARIANT *aVertices,[out] VARIANT *aVerticesPerLine,[out] VARIANT *aLineIsOpen) |
| HRESULT | GetMask ([in] FLOAT aMinX,[in] FLOAT aMinY,[in] FLOAT aMinZ,[in] FLOAT aMaxX,[in] FLOAT aMaxY,[in] FLOAT aMaxZ,[in] ULONG aSizeX,[in] ULONG aSizeY,[in] ULONG aSizeZ,[in, defaultvalue(0)] ULONG aTimeIndex,[out, retval] IDataSet **aMask) |
| HRESULT | GetNormals ([in] ULONG aSurfaceIndex,[out, retval] VARIANT *aNormals) |
| HRESULT | GetNumberOfContourPlanes ([out, retval] ULONG *aNumberOfContourPlanes) |
| HRESULT | GetNumberOfSurfaces ([out, retval] ULONG *aNumberOfSurfaces) |
| HRESULT | GetSelectedIndices ([out, retval] VARIANT *aIndices) |
| HRESULT | GetSingleMask ([in] ULONG aSurfaceIndex,[in] FLOAT aMinX,[in] FLOAT aMinY,[in] FLOAT aMinZ,[in] FLOAT aMaxX,[in] FLOAT aMaxY,[in] FLOAT aMaxZ,[in] ULONG aSizeX,[in] ULONG aSizeY,[in] ULONG aSizeZ,[out, retval] IDataSet **aMask) |
| HRESULT | GetSurfacesList ([in] VARIANT aSurfaceIndices,[out] VARIANT *aVertices,[out] VARIANT *aNumberOfVerticesPerSurface,[out] VARIANT *aTriangles,[out] VARIANT *aNumberOfTrianglesPerSurface,[out] VARIANT *aNormals,[out] VARIANT *aTimeIndexPerSurface) |
| HRESULT | GetTimeIndex ([in] ULONG aSurfaceIndex,[out, retval] ULONG *aTimeIndex) |
| HRESULT | GetTimePoint ([in] ULONG aIndexT,[out, retval] BSTR *aTimePoint) |
| HRESULT | GetTrackEdges ([out, retval] VARIANT *aEdges) |
| HRESULT | GetTrackIds ([out, retval] VARIANT *aTrackIds) |
| HRESULT | GetTriangles ([in] ULONG aSurfaceIndex,[out, retval] VARIANT *aTriangles) |
| HRESULT | GetVertices ([in] ULONG aSurfaceIndex,[out, retval] VARIANT *aVertices) |
| HRESULT | RemoveAllSurfaces () |
| HRESULT | RemoveSurface ([in] ULONG aSurfaceIndex) |
| HRESULT | SetContourPlaneOrientation ([in] tPlaneOrientation *aOrientation) |
| HRESULT | SetContourVertices ([in] ULONG aPlaneIndex,[in] VARIANT aVertices,[in] VARIANT aVerticesPerLine,[in] VARIANT aLineIsOpen) |
| HRESULT | SetSelectedIndices ([in] VARIANT aIndices) |
| HRESULT | SetTimePoint ([in] ULONG aIndexT,[in] BSTR aTimePoint) |
| HRESULT | SetTrackEdges ([in] VARIANT aEdges) |
This class allows an exchange of surfaces data.
| typedef enum ISurfaces::tPlaneOrientation ISurfaces::tPlaneOrientation |
Plane orientation
| HRESULT ISurfaces::AddSurface | ( | [in] VARIANT | aVertices, | |
| [in] VARIANT | aTriangles, | |||
| [in] VARIANT | aNormals, | |||
| [in, defaultvalue(0)] ULONG | aTimeIndex | |||
| ) |
Set vertices and triangle of a surface object.
| aVertices | [in] 2D-array containing positions of vertices | |
| aTriangles | [in] 2D-array containing indices of the vertices array | |
| aNormals | [in] 2D-array containing orientations of normals | |
| aTimeIndex | [in] Time index of the surface object (counting starts with 0). If not set, time index is zero. |
%% The following MATLAB code sets vertices, triangles, normals and time index to the Surface object. %% See "GetVertices", "GetTriangles", "GetNormals", "GetTimeIndex" for examples of valid arrays. %% The Surface object is assumed to be selected in the Surpass Scene tree. aSurface=vImarisApplication.mSurpassSelection; aSurface.SetSurface(aVertices,aTriangles,aNormals,aTimeIndex);
| HRESULT ISurfaces::AddSurfacesList | ( | [in] VARIANT | aVertices, | |
| [in] VARIANT | aNumberOfVerticesPerSurface, | |||
| [in] VARIANT | aTriangles, | |||
| [in] VARIANT | aNumberOfTrianglesPerSurface, | |||
| [in] VARIANT | aNormals, | |||
| [in] VARIANT | aTimeIndexPerSurface | |||
| ) |
Set vertices and triangle of a surface object.
| aVertices | [in] 2D-array containing positions of vertices | |
| aNumberOfVerticesPerSurface | [in] an array containing number of vertices per surface | |
| aTriangles | [in] 2D-array containing indices of the vertices array | |
| aNumberOfTrianglesPerSurface | [in] an array containing number of triangles per surface | |
| aNormals | [in] 2D-array containing orientations of normals | |
| aTimeIndexPerSurface | [in] Time index of the surface object (counting starts with 0). If not set, time index is zero. |
%% The following MATLAB code sets vertices, triangles, normals and time index to the Surface object. %% See "GetSurfacesList" for examples of valid arrays. %% The Surface object is assumed to be selected in the Surpass Scene tree. aSurface=vImarisApplication.mSurpassSelection; aSurface.AddSurfacesList(aVertices,aNumberOfVerticesPerSurface,aTriangles,aNumberOfTrianglesPerSurface,aNormals,aTimeIndex);
| HRESULT ISurfaces::GetCenterOfMass | ( | [in] ULONG | aSurfaceIndex, | |
| [out, retval] VARIANT * | aPositionXYZ | |||
| ) |
Get the center of mass of a surface object (counting starts with 0).
%% The following MATLAB code gets the time index of the Surface object. %% The Surface object is assumed to be selected in the Surpass Scene tree. aSurfaces = vImarisApplication.mSurpassSelection; aXYZ = aSurfaces.GetCenterOfMass(0);
| HRESULT ISurfaces::GetContourPlaneOrientation | ( | [out, retval] tPlaneOrientation * | aOrientation | ) |
Get the orientation of contour planes of a surface object.
| aOrientation | [out] orientation (tPlaneOrientation) of contour planes, can be either eOrientationYZ, eOrientationXZ or eOrientationXY |
%% The following MATLAB code gets the contour plane orientation of a surface object.
%% The Surface object is assumed to be selected in the Surpass Scene tree.
aSurface=vImarisApplication.mSurpassSelection;
aOrientation=aSurface.mContourPlaneOrientation
aOrientation =
eOrientationXY
Set the orientation of contour planes of a surface object. Note that a surface object only supports a single contour plane orientation. Calling this method with an orientation differing from the current one causes the existing contour to be deleted.
| aOrientation | [in] orientation (tPlaneOrientation) of contour planes, can be either eOrientationYZ, eOrientationXZ or eOrientationXY |
%% The following MATLAB code sets the contour plane orientation of a surface object. %% The Surface object is assumed to be selected in the Surpass Scene tree. aSurface=vImarisApplication.mSurpassSelection; aOrientation='eOrientationXY'; %% must be a string aSurface.mContourPlaneOrientation=aOrientation;
Get the orientation of contour planes of a surface object.
| aOrientation | [out] orientation of contour planes |
| HRESULT ISurfaces::GetContourPlanePosition | ( | [in] ULONG | aPlaneIndex, | |
| [out, retval] FLOAT * | aPlanePosition | |||
| ) |
Get the position along the normal axis (see "GetContourPlaneOrientation") of a contour plane of a surface object.
| aPlaneIndex | [in] index of plane to get position from | |
| aPlanePosition | [out] position of plane |
| HRESULT ISurfaces::GetContourVertices | ( | [in] ULONG | aPlaneIndex, | |
| [out] VARIANT * | aVertices, | |||
| [out] VARIANT * | aVerticesPerLine, | |||
| [out] VARIANT * | aLineIsOpen | |||
| ) |
Get a 2D-array (N x 2) containing the positions of contour vertices of the surface object in a specific plane. Each row holds the 2D coordinate of a vertex [x y] on that plane. The third coordinate can be retrieved by the method "GetContourPlanePosition". The vertex connectivity is given by a 1D-array (M x 1) which returns the number of vertices per contour line where counting is started from the top of the position array. The vertex positions in the 2D-array are ordered correspondingly and consecutive vertices are connected if they belong to the same loop. A further binary 1D-array (M x 1) returns whether a contour line is open or closed (the last vertex is connected to the first). The indices of this array correspond to the array which specifies the number of vertices per contour line.
| aPlaneIndex | [in] index of plane to get contour vertices from | |
| aVertices | [out] 2D-array containing positions of contour vertices | |
| aVerticesPerLine | [out] 1D-array containing numbers of contour vertices per line | |
| aLineIsOpen | [out] 1D-array containing whether a line is open (value=1) or closed (value=0) |
%% The following MATLAB code gets the list of contour vertices of the Surface
object in the first contour plane.
%% The Surface object is assumed to be selected in the Surpass Scene tree.
aSurface=vImarisApplication.mSurpassSelection;
aPlaneIndex=0;
[aVertices, aVerticesPerLine, aLineIsOpen]=aSurface.GetContourVertices(aPlaneIndex)
aVertices =
0 0
0 0.5103
0.5103 0
1.1867 0
1.1867 0.2601
...
aVerticesPerLine =
24
10
8
37
17
...
aLineIsOpen =
0
0
1
1
1
...
| HRESULT ISurfaces::GetMask | ( | [in] FLOAT | aMinX, | |
| [in] FLOAT | aMinY, | |||
| [in] FLOAT | aMinZ, | |||
| [in] FLOAT | aMaxX, | |||
| [in] FLOAT | aMaxY, | |||
| [in] FLOAT | aMaxZ, | |||
| [in] ULONG | aSizeX, | |||
| [in] ULONG | aSizeY, | |||
| [in] ULONG | aSizeZ, | |||
| [in, defaultvalue(0)] ULONG | aTimeIndex, | |||
| [out, retval] IDataSet ** | aMask | |||
| ) |
Get a voxel mask for the surface object. "aMin" and "aMax" describe the bounding box of the mask region, "aSize" the raster resolution of the mask. The result is a 8-bit dataset with 0 (zeros) and 1 (ones) which indicate outside or inside of the surface.
| aMinX | [in] Bounding box coordinate min X | |
| aMinY | [in] Bounding box coordinate min Y | |
| aMinZ | [in] Bounding box coordinate min Z | |
| aMaxX | [in] Bounding box coordinate max X | |
| aMaxY | [in] Bounding box coordinate max Y | |
| aMaxZ | [in] Bounding box coordinate max Z | |
| aSizeX | [in] Number of voxels in X | |
| aSizeY | [in] Number of voxels in Y | |
| aSizeZ | [in] Number of voxels in Z | |
| aTimeIndex | [in] Time index | |
| aMask | [out] Returns an IDataSet object with voxel values set to 0 and 1 to indicate outside (background) and inside (foreground). |
%% The following MATLAB code gets a voxel mask for the Surface object. %% The Surface object is assumed to be selected in the Surpass Scene tree. aSurface=vImarisApplication.mSurpassSelection; aMask=aSurface.GetMask(0,0,0,100,100,100,100,100,100,0);
| HRESULT ISurfaces::GetNormals | ( | [in] ULONG | aSurfaceIndex, | |
| [out, retval] VARIANT * | aNormals | |||
| ) |
Get a 2D-array containing the orientation of the normals to the triangles. Each row holds the orientation [x y z] of a normal and corresponds to a vertex with the same row index.
| aSurfaceIndex | [in] index of surface to get normals | |
| aNormals | [out] 2D-array containing orientations of normals |
%% The following MATLAB code gets the normals to the triangles of the Surface object.
%% The Surface object is assumed to be selected in the Surpass Scene tree.
aSurface=vImarisApplication.mSurpassSelection;
aNormals=aSurface.GetNormals
aNormals =
-0.2617 -0.3549 -0.8975
-0.2625 -0.8984 -0.3522
-0.8491 -0.3755 -0.3716
0.3524 -0.5252 -0.7746
0.3496 -0.8019 -0.4846
...
| HRESULT ISurfaces::GetNumberOfContourPlanes | ( | [out, retval] ULONG * | aNumberOfContourPlanes | ) |
Get the number of contour planes of a surface object.
| aNumberOfContourPlanes | [out] number of contour planes |
| HRESULT ISurfaces::GetNumberOfSurfaces | ( | [out, retval] ULONG * | aNumberOfSurfaces | ) |
| HRESULT ISurfaces::GetSelectedIndices | ( | [out, retval] VARIANT * | aIndices | ) |
Get the sub-selection. Sub-selection consists in surfaces indices only, no tracks.
%% The following MATLAB code gets the sub-selection of a surfaces object.
%% The Surfaces object is assumed to be selected in the Surpass Scene tree.
vSurfaces = vImarisApplication.mSurpassSelection;
vIndices = vSurfaces.GetSelectedIndices
vIndices =
3 13
| HRESULT ISurfaces::GetSingleMask | ( | [in] ULONG | aSurfaceIndex, | |
| [in] FLOAT | aMinX, | |||
| [in] FLOAT | aMinY, | |||
| [in] FLOAT | aMinZ, | |||
| [in] FLOAT | aMaxX, | |||
| [in] FLOAT | aMaxY, | |||
| [in] FLOAT | aMaxZ, | |||
| [in] ULONG | aSizeX, | |||
| [in] ULONG | aSizeY, | |||
| [in] ULONG | aSizeZ, | |||
| [out, retval] IDataSet ** | aMask | |||
| ) |
| HRESULT ISurfaces::GetSurfacesList | ( | [in] VARIANT | aSurfaceIndices, | |
| [out] VARIANT * | aVertices, | |||
| [out] VARIANT * | aNumberOfVerticesPerSurface, | |||
| [out] VARIANT * | aTriangles, | |||
| [out] VARIANT * | aNumberOfTrianglesPerSurface, | |||
| [out] VARIANT * | aNormals, | |||
| [out] VARIANT * | aTimeIndexPerSurface | |||
| ) |
Get vertices and triangle of a surface object.
| aSurfaceIndices | [in] indices to surfaces in the Surface object | |
| aVertices | [out] 2D-array containing positions of vertices | |
| aNumberOfVerticesPerSurface | [out] an array containing number of vertices per surface | |
| aTriangles | [out] 2D-array containing indices of the vertices array | |
| aNumberOfTrianglesPerSurface | [out] an array containing number of triangles per surface | |
| aNormals | [out] 2D-array containing orientations of normals | |
| aTimeIndexPerSurface | [out] Time index of the surface object (counting starts with 0). If not set, time index is zero. |
%% The following MATLAB code gets vertices, triangles, normals and time index to the Surface object. %% The Surface object is assumed to be selected in the Surpass Scene tree. aSurface=vImarisApplication.mSurpassSelection; [aVertices,aNumberOfVerticesPerSurface,aTriangles,aNumberOfTrianglesPerSurface,aNormals,aTimeIndex] = aSurface.GetSurfacesList(0);
| HRESULT ISurfaces::GetTimeIndex | ( | [in] ULONG | aSurfaceIndex, | |
| [out, retval] ULONG * | aTimeIndex | |||
| ) |
Get the time index of a surface object (counting starts with 0).
| aSurfaceIndex | [in] index of surface to get time index | |
| aTimeIndex | [out] Time index of this surface object |
%% The following MATLAB code gets the time index of the Surface object.
%% The Surface object is assumed to be selected in the Surpass Scene tree.
aSurface=vImarisApplication.mSurpassSelection;
aTimeIndex=aSurface.GetTimeIndex
aTimeIndex =
0
| HRESULT ISurfaces::GetTimePoint | ( | [in] ULONG | aIndexT, | |
| [out, retval] BSTR * | aTimePoint | |||
| ) |
Get the time calibration.
| aIndexT | [in] Time index (index counting starts with 0) | |
| aTimePoint | [out] Time calibration "YYYY-MM-DD HH:MM:SS.SSS". |
%% The following MATLAB code gets the time calibration for the specified time point
aIndexT=25;
vSpot=vImarisApplication.mSurpassSelection;
aTimePoint=vSpot.GetTimePoint(aIndexT)
aTimePoint =
2006-05-11 13:30:00.000
| HRESULT ISurfaces::GetTrackEdges | ( | [out, retval] VARIANT * | aEdges | ) |
Get the edges (connections) between the surfaces. A 2D array (E x 2) of integers is returned. The numbers are indices to surfaces within the Surfaces object. Each pair of indices represents an edge. Please note that the indices are not necessarily sorted.
| aEdges | [out] 2D array of (N x 2) surface indices |
%% The following MATLAB code gets the edges of the Surfaces object (graph).
%% The Surfaces object is assumed to be selected in the Surpass Scene tree.
vSurfaces=vImarisApplication.mSurpassSelection;
aEdges=vSurfaces.GetTrackEdges;
aEdges =
0 3
3 6
6 9
1 4
4 7
...
| HRESULT ISurfaces::GetTrackIds | ( | [out, retval] VARIANT * | aTrackIds | ) |
Get the ids of all N tracks. It returns a 1D array of integers with each array entry corresponding to what is read by "GetTrackEdges".
| aTrackIds | [out] track ids of all N tracks. |
%% The following MATLAB code gets the track ids of the Surfaces object (graph).
%% The Surfaces object is assumed to be selected in the Surpass Scene tree.
vSurfaces=vImarisApplication.mSurpassSelection;
aTrackIds=vSurfaces.GetTrackIds
vTrackIds =
1000000000 1000000000 1000000000 1000000001 1000000001 ...
| HRESULT ISurfaces::GetTriangles | ( | [in] ULONG | aSurfaceIndex, | |
| [out, retval] VARIANT * | aTriangles | |||
| ) |
Get a 2D-array (N x 3) of triangles constituting the surface object. Each row holds three indices to the vertices array and corresponds to a triangle of the surface object.
| aSurfaceIndex | [in] index of surface to get vertices | |
| aTriangles | [out] 2D-array (N x 3) containing indices to the vertices array |
%% The following MATLAB code gets the list of triangles of the Surface object.
%% The Surface object is assumed to be selected in the Surpass Scene tree.
aSurface=vImarisApplication.mSurpassSelection;
aTriangles=aSurface.GetTriangles
aVertices =
1 2 0
1 0 3
1 3 4
5 4 3
7 8 6
...
| HRESULT ISurfaces::GetVertices | ( | [in] ULONG | aSurfaceIndex, | |
| [out, retval] VARIANT * | aVertices | |||
| ) |
Get a 2D-array (N x 3) containing the positions of triangle vertices constituting the surface object. Each row holds the coordinate of a vertex [x y z] and corresponds to a normal with the same row index (see "GetNormals").
| aSurfaceIndex | [in] index of surface to get vertices | |
| aVertices | [out] 2D-array containing positions of vertices |
%% The following MATLAB code gets the list vertices of the triangles of the Surface object.
%% The Surface object is assumed to be selected in the Surpass Scene tree.
aSurface=vImarisApplication.mSurpassSelection;
aVertices=aSurface.GetVertices
aVertices =
0 0 0.5053
0 0.5103 0
0.5103 0 0
1.1867 0 0.2575
1.1867 0.2601 0
...
| HRESULT ISurfaces::RemoveAllSurfaces | ( | ) |
| HRESULT ISurfaces::RemoveSurface | ( | [in] ULONG | aSurfaceIndex | ) |
| HRESULT ISurfaces::SetContourPlaneOrientation | ( | [in] tPlaneOrientation * | aOrientation | ) |
Set the orientation of contour planes of a surface object. Note that a surface object only supports a single contour plane orientation. Calling this method causes the existing contour to be deleted.
| aOrientation | [in] orientation of contour planes |
| HRESULT ISurfaces::SetContourVertices | ( | [in] ULONG | aPlaneIndex, | |
| [in] VARIANT | aVertices, | |||
| [in] VARIANT | aVerticesPerLine, | |||
| [in] VARIANT | aLineIsOpen | |||
| ) |
Set the contour vertices of the surface object in a specific plane. Previously existing vertices are deleted.
| aPlaneIndex | [in] index of plane to set contour vertices | |
| aVertices | [in] 2D-array containing positions of contour vertices | |
| aVerticesPerLine | [in] 1D-array containing numbers of contour vertices per loop | |
| aLineIsOpen | [in] 1D-array containing whether a line is open (value=1) or closed (value=0) |
%% The following MATLAB code sets contour vertices in a contour plane of the Surface object. %% See "GetContourVertices" for examples of valid arrays. %% The Surface object is assumed to be selected in the Surpass Scene tree. aSurface=vImarisApplication.mSurpassSelection; aSurface.SetContourVertices(aPlaneIndex,aVertices,aVerticesPerLine,aLineIsOpen);
| HRESULT ISurfaces::SetSelectedIndices | ( | [in] VARIANT | aIndices | ) |
Set the sub-selection. Sub-selection consists in surfaces indices only, no tracks.
%% The following MATLAB code sets the sub-selection of a surfaces object. %% The Surfaces object is assumed to be selected in the Surpass Scene tree. vsurfaces = vImarisApplication.mSurpassSelection; vIndices = 0:5; vsurfaces.SetSelectedIndices(vIndices);
| HRESULT ISurfaces::SetTimePoint | ( | [in] ULONG | aIndexT, | |
| [in] BSTR | aTimePoint | |||
| ) |
Set the time calibration.
| aIndexT | [in] Time index (index counting starts with 0) | |
| aTimePoint | [in] Time calibration "YYYY-MM-DD HH:MM:SS.SSS". |
%% The following MATLAB code sets the time calibration for the specified time point aIndexT=25; aTimePoint='2006-05-11 13:30:00.000'; vSpot=vImarisApplication.mSurpassSelection; vSpot.SetTimePoint(aIndexT,aTimePoint);
| HRESULT ISurfaces::SetTrackEdges | ( | [in] VARIANT | aEdges | ) |
Set the edges (connections) between the surfaces. The numbers are indices to surfaces within the Surfaces object. Each pair of indices represents an edge. The indices do not need to be sorted.
| aEdges | [in] 2D array of (N x 2) surfaces indices |
%% The following MATLAB code sets the edges of the Surfaces object (graph). %% The Surfaces object is assumed to be selected in the Surpass Scene tree. vSurfaces=vImarisApplication.mSurpassSelection; aEdges = [[0 1];[1 7]]; vSurfaces.SetTrackEdges(aEdges);
1.6.1