zixinyang9109 / LiverMatch

Learning Feature Descriptors for Pre- and Intra-operative Point Cloud Matching for Laparoscopic Liver Registration
MIT License
10 stars 1 forks source link

How to get a partially deformed liver point cloud?(tgt_pcd) #4

Closed YueDai0514 closed 8 months ago

YueDai0514 commented 8 months ago
 I guess you extract the front surface of the point cloud after deformation beforehand, then f_mask is used as an index to get the front surface points, and then use the following code to randomly crop the front surface points, may I ask how did you get the point cloud on the front surface, I use the normal direction to determine it but the extracted point cloud is very sparse. Or did you extract them manually one by one?

def entry2data(self, index, scale=100.0, get_full=False): name = self.root_path+self.entries[index]

    with np.load(name, allow_pickle=True) as entry:
        # get transformation
        if 'max_dist' in entry.files:
            max_dist = entry['max_dist']
            f_scale = scale/max_dist
        else:
            f_scale = scale

        rot = entry['rot']
        trans = entry['trans']/f_scale
        s2t_flow = entry['s2t_flow']/f_scale
        src_pcd = entry['s_pc']/f_scale
        tgt_pcd = entry['t_pc']/f_scale
        full_tgt_pcd = entry['t_pc_full']/f_scale
        correspondences = entry['correspondences'] # from simulation
        if 'f_mask' in entry.files:
            f_mask = entry['f_mask']  # anterior face
zixinyang9109 commented 8 months ago

Yes, as it is described in the paper. The dataset does not have a lot of livers. It helps converge and meets real settings.

I used paraview to crop.

zixinyang9109 commented 8 months ago

Once the anterior surface is cropped, we do random crop on the anterior surface to reduce visibility. Hope it is clear.

YueDai0514 commented 8 months ago

Thank you very much for your advice.