NeuralRecon icon indicating copy to clipboard operation
NeuralRecon copied to clipboard

a question about transforms code

Open MarklearnML opened this issue 2 years ago • 0 comments

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']

MarklearnML avatar Nov 06 '22 12:11 MarklearnML