Exemplo n.º 1
0
    def __init__(self, args):
        emLabels.__init__(self,args)

        # save the command line argument dict as a string
        out = StringIO(); print( vars(args), file=out )
        self.arg_str = out.getvalue(); out.close()

        # xxx - meh, need to fix this
        if not self.data_type_out: self.data_type_out = self.data_type

        assert( len(self.fileprefixes) == 1 and len(self.filepaths) == 1 )   # prefix / path for h5 label inputs only

        # print out all initialized variables in verbose mode
        if self.dpCubeStitcher_verbose: print('dpCubeStitcher, verbose mode:\n'); print(vars(self))
Exemplo n.º 2
0
    def __init__(self, args):
        self.LIST_ARGS += ['mesh_infiles']
        emLabels.__init__(self,args)

        #self.data_type = self.DTYPE
        self.do_smooth = self.smooth.all()

        self.mesh_outfile_stl = ''
        if self.mesh_outfile:
            # vtk does not seem to like home ~/ or env vars in path
            self.mesh_outfile = os.path.expandvars(os.path.expanduser(self.mesh_outfile))

            ext = os.path.splitext(self.mesh_outfile)[1][1:]
            if ext == 'stl':
                self.mesh_outfile_stl = self.mesh_outfile
            else:
                assert( ext == 'h5' ) # only stl or h5 outputs supported

        # print out all initialized variables in verbose mode
        if self.dpLabelMesher_verbose: print('dpLabelMesher, verbose mode:\n'); print(vars(self))
Exemplo n.º 3
0
    def __init__(self, args):
        emLabels.__init__(self,args)

        self.fgbwconn = nd.morphology.generate_binary_structure(dpLoadh5.ND, self.fg_connectivity)
        self.bgbwconn = nd.morphology.generate_binary_structure(dpLoadh5.ND, self.bg_connectivity)