TrackSpecification: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
 
(16 intermediate revisions by one other user not shown)
Line 1: Line 1:
== SCORE Track file format ==
The following format can be used to encode
* meshes (3d surfaces)
* tracks (collections of meshes over time)
* lineages (binary trees of tracks representing the division of objects)
To just encode tracks, the mesh geometry fields and lineage fields can be skipped
Minimal example for just storing tracks


== Specification for track file format ==
<pre>
<pre>
                                            |Optional|
<FileFormatGFX version=2.0>
<ImagingSession>                            |  Y    | **** SESSION INFORMATION ****
<ListOfTracks>
  <HeaderFile>                              |  Y    | Name of the MegaCapture File containing all the session information
<Track>
    CaltechZebrafishSubsetData.meg          |  -    | 
<TrackID>2</TrackID>
  </HeaderFile>                              |  -    |
</Track>
</ImagingSession>                           |  -    |
</ListOfTracks>
<ListOfTracks>                               |  N    | **** TRACK INFORMATION ****
<ListOfMeshes>
  <NumberOfTracks>                          |  N    | Number of tracks contained in the lineage
<Mesh>
    327                                      |  -    |
<TrackID>2</TrackID>
  </NumberOfTracks>                          |  -    | 
<TCoord>2</TCoord>
  <Track>                                   |  N    |
<Centroid>
    <TrackID>                               |  Y    | Id of the lineage that the track belongs to
<X>114</X>
      2                                     |  -    |
<Y>202</Y>
    </TrackID>                               |  -    | 
<Z>66</Z>
    <LineageID>                              |  Y    |
</Centroid>
      0                                      |  -    |
</Mesh>
    </LineageID>                             |  -    |
<Mesh>
    <MotherTrackID>                          |  Y    |
<TrackID>2</TrackID>
      2                                      |  -    |
<TCoord>3</TCoord>
    </MotherTrackID>                         |  -    |   
<Centroid>
    <ListOfMeshes>                           |  N    |    **** MESHES IN THIS TRACK ****
<X>115</X>
      <NumberOfMeshes>                      |  N    | Number of meshes contained in the track
<Y>203</Y>
        23                                  |  -    |
<Z>67</Z>
      </NumberOfMeshes>                      |  -    |   
</Centroid>
      <Mesh>                                 |  N    | **** MESH INFORMATIONS ****
</Mesh>
        <MeshID>                             |  Y    |
</ListOfMeshes>
          3                                  |  -    |
</FileFormatGFX>
        </MeshID>                           |  -    | 
</pre>
        <TCoord>                             |  N    | Time coordinate of the mesh
          0                                  |  -    |
        </TCoord>                           |  -    | 
        <Centroid>                           |  N    | Spatial coordinate of the mesh's centroid
          <X>114.4960</X>                   |  N    | X coordinate
          <Y>202.7230</Y>                   |  N    | Y coordinate
          <Z>66.7290>/Z>                   |  N    | Z coordinate
        </Centroid>                         |  -    |   
        <Volume>                             |  Y    | Volume of mesh
          537.92                            |  -    |
        </Volume>                           |  -    | 
        <Filename>                           |  Y    | Filename of the vtk file containing the geometry of the mesh
          0_1.vtk                            |  -    |
        </Filename>                         |  -    | 
        <Intensity>                         |  Y    | intensity informations
          <Channel>0</Channel>               |  Y   |    - Channel
          <AverageValue>95.95</AverageValue> |  Y    |    - Average corresponding intensity
        </Intensity>                         |  -    |
      </Mesh>                               |  -    |
    </ListOfMeshes>                         |  -    |
  <Track>                                   |  -    |
<ListOfTracks>                               |  -    |


Please note that the file can contain multiple Track and Mesh sections which allows new data to be appended to the end of the file without rewriting the whole file such as for real time video processing (which is why we decided not to nest meshes inside tracks).
This format can also be used for storing the full geometry of the 3D objects at each time point (meshes) and for storing the connections between tracks to form lineages. You should use only one method for storing the geometry of each mesh (label map file, label map embedded, vtk file, or vtk embedded). You can have greater than one MotherTrackID to allow for Directed Acyclic Graphs in case objects fuse. You can also have greater than 2 DaughterTrackID's to allow for trees greater than binary in case an object splits into >2.
Full example for storing tracks as well as geometry of meshes and the connection between tracks to form lineages.
<pre>
<FileFormatGFX version=2.0>
<OriginalData>
<Author>Megason Laboratory</Author>
<Path>http://www.megason-lab.org/dataset/imaging-session.meg</Path>
</OriginalData>
<ListOfTracks>
<Track>
<TrackID>2</TrackID>
<MotherTrackID>1</MotherTrackID>
<DaugtherTrackID>4</DaugtherTrackID>
<DaugtherTrackID>112</DaugtherTrackID>
<LineageID>33</LineageID>
</Track>
<Track>
<TrackID>3</TrackID>
<MotherTrackID>1</MotherTrackID>
<DaugtherTrackID>6</DaugtherTrackID>
<DaugtherTrackID>12</DaugtherTrackID>
</Track>
</ListOfTracks>
<ListOfMeshes>
<Mesh>
<MeshID>1234</MeshID>
<TrackID>2</TrackID>
<TCoord>25</TCoord>
<Centroid>
<X>114.4960</X>
<Y>202.7230</Y>
<Z>66.7290</Z>
</Centroid>
<Geometry>
<LabelMap>
<File>
<Path>/path/to/label/map/at/time/point/25.mha</Path>
<label>56</label>
</File>
<Embedded>
<LineList>
<Line>
<BeginIndex>
<X></X>
<Y></Y>
<Z></Z>
</BeginIndex>
<Length></Length>
</Line>
</LineList>
</Embedded>
</LabelMap>
<Vector>
<Path>/path/to/mesh/file.vtk</Path>
<Encoded>
<Type>vtk</Type>
<Dump></Dump>
<Encoded>
</Vector>
</Geometry>
<Attributes>
<Volume unit="micrometer">123</Volume>
<TotalIntensity channel="1">45443</TotalIntensity>
<SurfaceArea unit="micrometer2">44328</SurfaceArea>
</Attributes>
</Mesh>
</ListOfMeshes>
</FileFormatGFX>
</pre>
== SCORE Track object format ==
<pre>
typedef boost::multi_index_container<
  TObject,
  boost::multi_index::indexed_by<
    boost::ordered_non_unique< Time >,
    BOOST_MULTI_INDEX_MEMBER(TObject, TimeType, Time)
    >,
  boost::multi_index::indexed_by<
    boost::ordered_non_unique< LineageID >,
    BOOST_MULTI_INDEX_MEMBER(TObject, itk::IdentifierType, LineageID)
    >,
  boost::multi_index::indexed_by<
    boost::ordered_non_unique< TrackID >,
    BOOST_MULTI_INDEX_MEMBER(TObject, itk::IdentifierType, TrackID)
    >,
  boost::multi_index::indexed_by<
    boost::ordered_unique< MeshID >,
    BOOST_MULTI_INDEX_MEMBER(TObject, itk::IdentifierType, MeshID)
    >
> MultiIndexContainerType;
</pre>
</pre>

Latest revision as of 20:06, 9 August 2011

SCORE Track file format

The following format can be used to encode

  • meshes (3d surfaces)
  • tracks (collections of meshes over time)
  • lineages (binary trees of tracks representing the division of objects)

To just encode tracks, the mesh geometry fields and lineage fields can be skipped

Minimal example for just storing tracks

<FileFormatGFX version=2.0>
	<ListOfTracks>
		<Track>
			<TrackID>2</TrackID>
		</Track>
	</ListOfTracks>
	<ListOfMeshes>
		<Mesh>
			<TrackID>2</TrackID>
			<TCoord>2</TCoord>
			<Centroid>
				<X>114</X>
				<Y>202</Y>
				<Z>66</Z>
			</Centroid>
		</Mesh>
		<Mesh>
			<TrackID>2</TrackID>
			<TCoord>3</TCoord>
			<Centroid>
				<X>115</X>
				<Y>203</Y>
				<Z>67</Z>
			</Centroid>
		</Mesh>
	</ListOfMeshes>
</FileFormatGFX>

Please note that the file can contain multiple Track and Mesh sections which allows new data to be appended to the end of the file without rewriting the whole file such as for real time video processing (which is why we decided not to nest meshes inside tracks).

This format can also be used for storing the full geometry of the 3D objects at each time point (meshes) and for storing the connections between tracks to form lineages. You should use only one method for storing the geometry of each mesh (label map file, label map embedded, vtk file, or vtk embedded). You can have greater than one MotherTrackID to allow for Directed Acyclic Graphs in case objects fuse. You can also have greater than 2 DaughterTrackID's to allow for trees greater than binary in case an object splits into >2.

Full example for storing tracks as well as geometry of meshes and the connection between tracks to form lineages.

<FileFormatGFX version=2.0>
	<OriginalData>
		<Author>Megason Laboratory</Author>
		<Path>http://www.megason-lab.org/dataset/imaging-session.meg</Path>
	</OriginalData>
	<ListOfTracks>
		<Track>
			<TrackID>2</TrackID>
			<MotherTrackID>1</MotherTrackID>
			<DaugtherTrackID>4</DaugtherTrackID>
			<DaugtherTrackID>112</DaugtherTrackID>
			<LineageID>33</LineageID>
		</Track>
		<Track>
			<TrackID>3</TrackID>
			<MotherTrackID>1</MotherTrackID>
			<DaugtherTrackID>6</DaugtherTrackID>
			<DaugtherTrackID>12</DaugtherTrackID>
		</Track>
	</ListOfTracks>
	<ListOfMeshes>
		<Mesh>
			<MeshID>1234</MeshID>
			<TrackID>2</TrackID>
			<TCoord>25</TCoord>
			<Centroid>
				<X>114.4960</X>
				<Y>202.7230</Y>
				<Z>66.7290</Z>
			</Centroid>
			<Geometry>
				<LabelMap>
					<File>
						<Path>/path/to/label/map/at/time/point/25.mha</Path>
						<label>56</label>
					</File>
					<Embedded>
						<LineList>
							<Line>
								<BeginIndex>
									<X></X>
									<Y></Y>
									<Z></Z>
								</BeginIndex>
								<Length></Length>
							</Line>
						</LineList>
					</Embedded>
				</LabelMap>
				<Vector>
					<Path>/path/to/mesh/file.vtk</Path>
					<Encoded>
						<Type>vtk</Type>
						<Dump></Dump>
					<Encoded>
				</Vector>
			</Geometry>
			<Attributes>
				<Volume unit="micrometer">123</Volume>
				<TotalIntensity channel="1">45443</TotalIntensity>
				<SurfaceArea unit="micrometer2">44328</SurfaceArea>
			</Attributes>
		</Mesh>
	</ListOfMeshes>
</FileFormatGFX>

SCORE Track object format

typedef boost::multi_index_container<
  TObject,
  boost::multi_index::indexed_by<
    boost::ordered_non_unique< Time >,
    BOOST_MULTI_INDEX_MEMBER(TObject, TimeType, Time)
    >,
  boost::multi_index::indexed_by<
    boost::ordered_non_unique< LineageID >,
    BOOST_MULTI_INDEX_MEMBER(TObject, itk::IdentifierType, LineageID)
    >,
  boost::multi_index::indexed_by<
    boost::ordered_non_unique< TrackID >,
    BOOST_MULTI_INDEX_MEMBER(TObject, itk::IdentifierType, TrackID)
    >,
  boost::multi_index::indexed_by<
    boost::ordered_unique< MeshID >,
    BOOST_MULTI_INDEX_MEMBER(TObject, itk::IdentifierType, MeshID)
    >
> MultiIndexContainerType;