DOI: 10.34810/data2251
title: Replication data for "BronchoPose: an analysis of data and model configuration for vision-based bronchoscopy pose estimation"

description: &lt;h1&gt;&lt;b&gt;DESCRIPTION:&lt;/b&gt;&lt;/h1&gt; 
&lt;br&gt;&lt;br&gt;
BronchoPose dataset: a bronchoscopy navigation synthetic dataset based on real anatomies to enable fair comparison among methods. 
The presented database is composed by trajectories across airways extracted from Computerized Tomography (CT) scans. 
The anatomy of airways was extracted using a self-developed segmentation method. The trajectories of the database include the navigation 
path (spatial coordinates), the camera pose, and the simulated images of the virtual bronchoscopy. Virtual airways models are simulated using our own 
platform developed in C++ and VTK.
From the virtual models, bronchoscope trajectories are simulated from the trachea entrance up until the 4 levels and cover the upper-right (ur), 
lower-right (br), upper-left (ul), and lower-left (bl) lobes. Trajectories are generated from the central navigation path through the luminal 
central line traversed using the arch-length parameter. Different increments in this parameter allow the simulation of varying velocities across the path. 
For each central path, different variations, both, in position and camera orientation are generated. Finally, paths with neighboring variations 
are randomly combined along the navigation arc-length parameter in order to simulate realistic trajectories. In total, our dataset has 876 trajectories per 
patient and lobe, amounting to a total of 842,712 frames. 
&lt;br&gt;&lt;br&gt;
description: <b>CONTENT:</b>
<br><br>
The dataset contains 2 folders by previously decompressing 4 .zip files:
<br><br>
<b>1.Segmentations:</b>
<br>
Contains the airway masks (with 1 as airway) of 6 different patients (Lens3.mat, P18.mat, P20.mat, P21.mat, P25.mat, P30.mat) in matlab volumes.
load in Python: import scipy.io
 mat = scipy.io.loadmat('P18.mat')
 vol = mat['DistalGlobalTh']
 vol.shape = (401, 401, 693) #X,Y,Z
<br><br>
<b>2. VirtualNavigations:</b>
<br>
Contains 6 folders, one for each patient: 
<br>
Lens3_INSP_SIN --&gt; Lens3<br>
LENS_P18_14_01_2016_INSP_CPAP --&gt; P18<br>
LENS_P20_14_01_2016_INSP_CPAP --&gt; P20<br>
LENS_P21_04_02_2016_INSP_CPAP --&gt; P21<br>
LENS_P25_25_02_2016_INSP_CPAP --&gt; P25<br>
LENS_P30_14_04_2016_INSP_CPAP --&gt; P30<br>
<br><br>
<b>2.1 Each patient folder:</b>
<br>
For each patient there are 4 central navigation paths and their variations defined in a .csv file with all navigations metadatas generated with VTK. 
For each central camera navigation position, 875 variations (images) are generated combining position and rotation changes. 
Folders are named with lung lobule part Upper left (ul), UpperRight (ur), BottomLeft (bl), bottomRight (br) with all the generated png images.
<br><br>
<b>2.2 CSV files metadata content:</b>
<br>
.csv file with all navigations metadatas generated with VTK
<br><br>
<b>2.2.1 CSV fields:</b>
<br>
patient --&gt; patient id
lobe --&gt; path lung lobule: Upper left (ul), UpperRight (ur), BottomLeft (bl), bottomRight (br)<br>
level --&gt; this field is incorrect, don't use.<br>
pos_x,pos_y,pos_z --&gt; current camera position<br>
up_x,up_y,up_z --&gt; camera up vector<br>
shift_x,shift_y,shift_z --&gt; camera position shift from central navigation. To get central <br>position (pos_x,pos_y,pos_z)-(shift_x,shift_y,shift_z).<br>
q_w,q_x,q_y,q_z --&gt; current quaternion using GetQuaternion() from VTK<br>
qw_base,qx_base,qy_base,qz_base --&gt; quaternion of the camera position from its central navigation.<br>
Rx,Ry,Rz --&gt; current rotation of X,Y and Z axis.<br>
Rx_base,Ry_base,Rz_base --&gt; rotation of X,Y and Z axis of the camera position from its central navigation.<br>
filename --&gt; current generated png image<br>
base_filename --&gt; png image of the camera position from its central navigation.<br>
<br><br>

<b>2.2.2 CSV clarifications:</b>
<br>
1.Central navigation path from different lobules (in this case ul) can be extracted by selecting csv rows that satisfaies the following restrictions:
<br><br>
If lobe=='ul' and (shift_x,shift_y,shift_z)=(0,0,0) and (q_w,q_x,q_y,q_z) = (qw_base,qx_base,qy_base,qz_base) and filename=base_filename
then this is a central camera postion whithout variations. 
<br><br>
2.Filename nomenclature:
<br>
[patient id]_[lobe]_[level]_[SkelPoint]_[#PoseVariation].png
<br><br>
Example: LENS_P18_14_01_2016_INSP_CPAP_br_0_360_0.png<br>
patient id : LENS_P18_14_01_2016_INSP_CPAP (same name has the patient folder)<br>
lobe : br<br>
level : 0 (not useful, don't use)<br>
SkelPoint : 360 (skel point extracted from a skeletonitzation of the volumen segementation).<br>
#PoseVariation : from 0 to 875 different pose (camera position and orientation) variations for each camera central navigation. <br>
 If #PoseVariation=0 then this is an image of central camera postion whithout variations.<br>
<br><br>
<b>3. Bronchial Tree Objects & Camera Pose Alignment</b>
<br>
3.1 Six Obj files of the 6 corresponding patients.<br>
3.2 Readme file: This document explains how to use the provided `.obj` files (bronchial tree geometry) and `.csv` files (camera trajectories) to reconstruct 
 the original synthetic views, without requiring access to the original rendering code.
<br><br>
<b>Cite this dataset:</b>
<br>
Borrego-Carazo, J., Sanchez, C., Castells-Rufas, D., Carrabina, J., & Gil, D. (2023). BronchoPose: an analysis of data and model configuration for vision-based bronchoscopy pose estimation. Computer Methods and Programs in Biomedicine, 228, 107241. doi: https://doi.org/10.1016/j.cmpb.2022.107241
<br><br>
<b>Paper code available:</b> https://github.com/BCJuan/BronchoTrack
description: MATLAB, null