コード例 #1
0
 def __init__(self, userDetails, inpath, outpath, compression, section_id, total_sections, input_data, pixelregion, outChan, scalefact, rotation):
     OMEBase.__init__(self)
     self.outputtif_path = outpath
     self.ID = section_id
     self.Total = total_sections
     self.InputPath = inpath
     self.InputFilename = self.InputPath.split("\\")[-1]
     self.imarray = input_data
     self.outChan = outChan
     self.rotation = rotation
     self.roi = pixelregion
     self.meta = SlideImage(self.InputPath)
     self.mode = self.meta.micro_mode()
     self.scalefact = scalefact
     self.tile_width = 1024
     self.tile_height = 1024
     self.compression = compression
     if not userDetails:
         current_user = '******'
         current_group = 'QBIgroup'
     else:
         current_user = userDetails[0]
         current_group = userDetails[1]
         
     if current_user not in people:
         people[current_user] = dict(first_name = userDetails[2], last_name = userDetails[3],
                                 email = userDetails[0]+'@uq.edu.au', user_name = userDetails[0],
                                 institution='Queensland Brain Institute', groups = current_group)  
     if current_group not in groups:
         groups[current_group] = dict(name = userDetails[1], contact_id = userDetails[0])
     
     self.current_user = current_user
     self.current_group = current_group
コード例 #2
0
 def __init__(self,conn=None,source=None,input_dir=None,filename=None,box=None,theZ=None,theC=None,theT=None,ROI=None):
     OMEBase.__init__(self)
     self.store = ome_xml.OME()
     self.conn = conn
     self.source = source
     self.input_dir = input_dir
     self.filename = filename
     self.box = box
     if source:
         if box:
             self.sizeX = int(box[2])
             self.sizeY = int(box[3])
         else:
             self.sizeX = int(source.getSizeX())
             self.sizeY = int(source.getSizeY())
         if theZ is not None:
             if isinstance(theZ,list):
                 self.sizeZ = len(theZ)
                 self.slicesZ = theZ
             else:
                 self.sizeZ = 1
                 self.slicesZ = [theZ]
         else:
             self.sizeZ = int(source.getSizeZ())
             self.slicesZ = range(self.sizeZ)
         if theC is not None:
             if isinstance(theC,list):
                 self.sizeC = len(theC)
                 self.slicesC = theC
             else:
                 self.sizeC = 1
                 self.slicesC = [theC]
         else:
             self.sizeC = int(source.getSizeC())
             self.slicesC = range(self.sizeC)
         if theT is not None:
             if isinstance(theT,list):
                 self.sizeT = len(theT)
                 self.slicesT = theT
             else:
                 self.sizeT = 1
                 self.slicesT = [theT]
         else:
             self.sizeT = int(source.getSizeT())
             self.slicesT = range(self.sizeT)
             
         self.roi_count = 0
         if ROI:    
             self.ROI = ROI
             self.roi_count = len(ROI)
             
         self.Xres = source.getPrimaryPixels().physicalSizeX.getValue()
         self.Yres = source.getPrimaryPixels().physicalSizeY.getValue()
         self.Zres = source.getPrimaryPixels().physicalSizeZ.getValue()
         self.dtype = source.getPixelsType()
         self.date = str(source.getDate())
コード例 #3
0
 def __init__(self,conn=None,source=None,input_dir=None,filename=None,box=None,theZ=None,theC=None,theT=None,ROI=None):
     OMEBase.__init__(self)
     self.store = ome_xml.OME()
     self.conn = conn
     self.source = source
     self.input_dir = input_dir
     self.filename = filename
     self.box = box
     if source:
         if box:
             self.sizeX = int(box[2])
             self.sizeY = int(box[3])
         else:
             self.sizeX = int(source.getSizeX())
             self.sizeY = int(source.getSizeY())
         if theZ is not None:
             if isinstance(theZ,list):
                 self.sizeZ = len(theZ)
                 self.slicesZ = theZ
             else:
                 self.sizeZ = 1
                 self.slicesZ = [theZ]
         else:
             self.sizeZ = int(source.getSizeZ())
             self.slicesZ = range(self.sizeZ)
         if theC is not None:
             if isinstance(theC,list):
                 self.sizeC = len(theC)
                 self.slicesC = theC
             else:
                 self.sizeC = 1
                 self.slicesC = [theC]
         else:
             self.sizeC = int(source.getSizeC())
             self.slicesC = range(self.sizeC)
         if theT is not None:
             if isinstance(theT,list):
                 self.sizeT = len(theT)
                 self.slicesT = theT
             else:
                 self.sizeT = 1
                 self.slicesT = [theT]
         else:
             self.sizeT = int(source.getSizeT())
             self.slicesT = range(self.sizeT)
             
         self.roi_count = 0
         if ROI:    
             self.ROI = ROI
             self.roi_count = len(ROI)
             
         self.Xres = source.getPrimaryPixels().physicalSizeX.getValue()
         self.Yres = source.getPrimaryPixels().physicalSizeY.getValue()
         self.Zres = source.getPrimaryPixels().physicalSizeZ.getValue()
         self.dtype = source.getPixelsType()
         self.date = str(source.getDate())
コード例 #4
0
    def __init__(self, userDetails, inpath, outpath, compression, section_id,
                 total_sections, input_data, pixelregion, outChan, scalefact,
                 rotation):
        OMEBase.__init__(self)
        self.outputtif_path = outpath
        self.ID = section_id
        self.Total = total_sections
        self.InputPath = inpath
        self.InputFilename = self.InputPath.split("\\")[-1]
        self.imarray = input_data
        self.outChan = outChan
        self.rotation = rotation
        self.roi = pixelregion
        self.meta = SlideImage(self.InputPath)
        self.mode = self.meta.micro_mode()
        self.scalefact = scalefact
        self.tile_width = 1024
        self.tile_height = 1024
        self.compression = compression
        if not userDetails:
            current_user = '******'
            current_group = 'QBIgroup'
        else:
            current_user = userDetails[0]
            current_group = userDetails[1]

        if current_user not in people:
            people[current_user] = dict(
                first_name=userDetails[2],
                last_name=userDetails[3],
                email=userDetails[0] + '@uq.edu.au',
                user_name=userDetails[0],
                institution='Queensland Brain Institute',
                groups=current_group)
        if current_group not in groups:
            groups[current_group] = dict(name=userDetails[1],
                                         contact_id=userDetails[0])

        self.current_user = current_user
        self.current_group = current_group