Skip to content
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

a question about transforms code #120

Open
MarklearnML opened this issue Nov 6, 2022 · 0 comments
Open

a question about transforms code #120

MarklearnML opened this issue Nov 6, 2022 · 0 comments

Comments

@MarklearnML
Copy link

Thank to the nice work!But I have some questions about the transforms
I just wondering why origin[2] is the const equal to -0.2 , so any vol_origin_parital's z is the const? Isn't the origin of each fragment different? Why is the point of the z-axis constant?

-------adjust volume bounds-------

    num_layers = 3
    center = (torch.tensor(((bnds[0, 1] + bnds[0, 0]) / 2, (bnds[1, 1] + bnds[1, 0]) / 2, -0.2)) - data[       
        'vol_origin']) / self.voxel_size
    center[:2] = torch.round(center[:2] / 2 ** num_layers) * 2 ** num_layers
    center[2] = torch.floor(center[2] / 2 ** num_layers) * 2 ** num_layers
    origin = torch.zeros_like(center)
    origin[:2] = center[:2] - torch.tensor(self.voxel_dim[:2]) // 2
    origin[2] = center[2]
    vol_origin_partial = origin * self.voxel_size + data['vol_origin']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant