lama/elastix/propagate_volumes.py
def run(self, prefix=None):
        """
        Parameters
        ----------
        prefix: str
            A prefix that is added to the stats volumes. To locate correct transform inversion files, look for files
            with this prefix missing
        """

    #     inverting_names = os.listdir(self.inverted_tform_stage_dirs[        # 0])

    #     for i, vol_name in enumerate(inverting_names):
    #         if self.batch_invert:
    #             invertable = self.invertables
    #         else:
    #             invertable = self.invertables[vol_name]

        volname, ext = splitext(basename(self.invertables))
        if prefix and volname.startswith(prefix):
            original_vol_name = volname[len(prefix):]  # remove the prfix to get the original vol name to find the tf
        else:
            original_vol_name = volname
        invertable = self.invertables

        for inversion_stage in self.inverted_tform_stage_dirs:
            invert_stage_out = join(self.out_dir, basename(inversion_stage))
            common.mkdir_if_not_exists(invert_stage_out)

            inv_tform_dir = join(inversion_stage, original_vol_name)

            transform_file = join(inv_tform_dir, PROPAGATE_IMAGE_TRANSFORM)
            invert_vol_out_dir = join(invert_stage_out, volname)
            common.mkdir_if_not_exists(invert_vol_out_dir)

            invertable = self._propagate(invertable, transform_file, invert_vol_out_dir, self.threads)

        Parameters
        ----------
        prefix: str
            A prefix that is added to the stats volumes. To locate correct transform inversion files, look for files
            with this prefix missing
        
Parameters
prefix: str
A prefix that is added to the stats volumes. To locate correct transform inversion files, look for files
with this prefix missing
Parameters prefix : str A prefix that is added to the stats volumes . To locate correct transform inversion files look for files with this prefix missing
def run(self, prefix=None):
    [vol_name]
        volname, ext = splitext(basename(self.invertables))
        if prefix and volname.startswith(prefix):
            original_vol_name = volname[len(prefix):]  
        else:
            original_vol_name = volname
        invertable = self.invertables
        for inversion_stage in self.inverted_tform_stage_dirs:
            invert_stage_out = join(self.out_dir, basename(inversion_stage))
            common.mkdir_if_not_exists(invert_stage_out)
            inv_tform_dir = join(inversion_stage, original_vol_name)
            transform_file = join(inv_tform_dir, PROPAGATE_IMAGE_TRANSFORM)
            invert_vol_out_dir = join(invert_stage_out, volname)
            common.mkdir_if_not_exists(invert_vol_out_dir)
            invertable = self._propagate(invertable, transform_file, invert_vol_out_dir, self.threads)
def run ( self , prefix = None ) : volname , ext = splitext ( basename ( self . invertables ) ) if prefix and volname . startswith ( prefix ) : original_vol_name = volname [ len ( prefix ) : ] else : original_vol_name = volname invertable = self . invertables for inversion_stage in self . inverted_tform_stage_dirs : invert_stage_out = join ( self . out_dir , basename ( inversion_stage ) ) common . mkdir_if_not_exists ( invert_stage_out ) inv_tform_dir = join ( inversion_stage , original_vol_name ) transform_file = join ( inv_tform_dir , PROPAGATE_IMAGE_TRANSFORM ) invert_vol_out_dir = join ( invert_stage_out , volname ) common . mkdir_if_not_exists ( invert_vol_out_dir ) invertable = self . _propagate ( invertable , transform_file , invert_vol_out_dir , self . threads )
Parameters
prefix: str
A prefix that is added to the stats volumes.
Parameters prefix : str A prefix that is added to the stats volumes .
"""
        Parameters
        ----------
        prefix: str
            A prefix that is added to the stats volumes. To locate correct transform inversion files, look for files
            with this prefix missing
        """ #     inverting_names = os.listdir(self.inverted_tform_stage_dirs[        # 0]) #     for i, vol_name in enumerate(inverting_names): #         if self.batch_invert: #             invertable = self.invertables #         else: #             invertable = self.invertables[vol_name] # remove the prfix to get the original vol name to find the tf
self
prefix