-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some HiP-CT docs #18
Open
dstansby
wants to merge
3
commits into
lincbrain:main
Choose a base branch
from
dstansby:hipct
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# HiP-CT data | ||
|
||
HiP-CT stands for hierarchical phase-contrast tomography. | ||
For more information on the modality see the [HiP-CT website](https://mecheng.ucl.ac.uk/hip-ct/). | ||
Most of the time HiP-CT consists of a single 'low' (but still quite high!) resolution scan of a whole sample, and then one or more 'high' resolution scans of particular volumes of interest within the same sample. | ||
|
||
## Data acquisition and naming | ||
|
||
There are HiP-CT scans of two donors, S45 and I58. | ||
The data are part of the [Pilot human brains dataset](https://lincbrain.org/dandiset/000005) on lincbrain. | ||
|
||
Datasets have the name `sub-<donor>_sample-<sample name>_chunk<chunk number>_PC.ome.zarr`. | ||
The chunk number is set to `yyxx`, where yy is the resolution of the scan in micrometers, and xx is a scan number that is unique between datasets. | ||
For example, a chunk number of `402` is the second 4um scan. | ||
The lowest resolution dataset (equivalently, highest chunk number) is the overview dataset that contains an image of the whole sample. | ||
There are then one or more datasets at higher resolution. | ||
|
||
## Registration | ||
|
||
Each high resolution dataset is registered to the overview dataset using [`hipct-reg`](https://github.com/hipCTProject/hipct-reg). | ||
Each transform maps the pixel coordinates of the high resolution zoom datasets to the overview full-sample dataset. | ||
The transform is of the form: | ||
|
||
$$ | ||
T(\mathbf{x}) = s \left ( \mathbf{R} \cdot\mathbf{x} \right ) + \mathbf{t} | ||
$$ | ||
|
||
Where | ||
|
||
- $s$ is a scaling factor | ||
- $\mathbf{R}$ is a rotation matrix that rotates about the z-axis. | ||
- $\mathbf{t}$ is a translation vector | ||
|
||
The rotation matrix takes the form | ||
|
||
$$ | ||
\mathbf{R} = \begin{pmatrix} | ||
\cos(-\theta) & \sin(-\theta) & 0 \\ | ||
-\sin(-\theta) & \cos(-\theta) & 0 \\ | ||
0 & 0 & 1 \\ | ||
\end{pmatrix} | ||
$$ | ||
|
||
The transform has 5 parameters (1 scaling, 1 rotation, 3 translation). | ||
|
||
### Registration accuracy | ||
|
||
The HiP-CT registration pipeline is designed to be accurate enough to approximately visually align two datasets. **It is not designed for pixel perfect registration.** We recommend anyone doing analysis relying on the registration between two datasets performs a more accurate registration themselves, using our registration as an initial starting point. | ||
|
||
### Registration data | ||
|
||
|
||
| Dataset | Overview dataset | $\mathbf{t}$ | $s$ | $\theta$ (degrees) | | ||
| -------- | -------- | -------- | -------- | -------- | | ||
| `sub-I58_sample-blockIC2_chunk-101_PC` | `sub-I58_sample-blockIC2_chunk-401_PC` | (3746.4467746089194, 3660.0610535229666, 1127.3616712249263) | 0.2016106611944697 | -6.496401244495998 | | ||
| `sub-I58_sample-blockIC2_chunk-201_PC` | `sub-I58_sample-blockIC2_chunk-401_PC` | (2119.695989239648, 2321.6572801771194, 971.0041825720597) | 0.5181803632402424 | 0.5004912711693281 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
window.MathJax = { | ||
tex: { | ||
inlineMath: [["\\(", "\\)"]], | ||
displayMath: [["\\[", "\\]"]], | ||
processEscapes: true, | ||
processEnvironments: true | ||
}, | ||
options: { | ||
ignoreHtmlClass: ".*|", | ||
processHtmlClass: "arithmatex" | ||
} | ||
}; | ||
|
||
document$.subscribe(() => { | ||
MathJax.startup.output.clearCache() | ||
MathJax.typesetClear() | ||
MathJax.texReset() | ||
MathJax.typesetPromise() | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should use the acq entity for the resolution. The chunk entity could be used for different fields of view in the same sample. If the same field of view is acquired multiple times then perhaps the ses entity should be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds good - we could do
acq-overview
andacq-zoom
for the low/high resolution scans. I don't think we have the same field of view multiple times, and if we do it won't be exactly the same scan/field of view so I don't think we need to useses
.I'll take a look into renaming our datasets to use
acq
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dstansby. Sounds great.
So for example the file
sub-I58_sample-blockIC2_chunk-201_PC.ome.zarr
would be renamed tosub-I58_sample-blockIC2_acq-zoom_chunk-01_PC.ome.zarr
andsub-I58_sample-blockIC2_chunk-401_PC.ome.zarr
would be renamed tosub-I58_sample-blockIC2_acq-zoom_chunk-02_PC.ome.zarr
?Since you are renaming files should we change the modality suffix? If I am not mistaken, I believe that
PC
is now going to beXPCT
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the new datasets would be called:
sub-I58_sample-blockIC2_acq-zoom_chunk-01_PC.ome.zarr
sub-I58_sample-blockIC2_acq-overview_PC.ome.zarr
For the overviews, we only have one per sample, so I think we don't want to use
chunk
for these datasets? If we end up more than one overview per sample (e.g., taken at different times or with different resolutions) we could then make theacq
label more specific for each dataset (e.g.,acq-overview2025
in the hypothetical instance that we do another one next year)