partition

Возврат секционированной части blockedImageDatastore

    Описание

    пример

    subbimds = partition(bimds,n,index) разделяет заблокированный image datastore bimds в количество деталей, заданное как n, и возвращает раздел, соответствующий индексу index.

    Примеры

    свернуть все

    Создайте заблокированное изображение.

    bim = blockedImage('tumor_091R.tif');

    Создайте хранилище datastore заблокированного изображения из заблокированного изображения.

    bimds = blockedImageDatastore(bim);

    Разделите заблокированное хранилище datastore на два раздела и создайте новую blockedImageDatastore объект данных в первом разделе.

    bimdsp1 = partition(bimds, 2, 1);

    Считайте данные из первого раздела.

    disp('Partition 1');
    Partition 1
    
    while hasdata(bimdsp1)
          [data, info] = read(bimdsp1);
          disp(info);
    end
           BlockSub: [1 1 1]
              Start: [1 1 1]
                End: [1024 1024 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [1 2 1]
              Start: [1 1025 1]
                End: [1024 2048 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [1 3 1]
              Start: [1 2049 1]
                End: [1024 3072 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [1 4 1]
              Start: [1 3073 1]
                End: [1024 4096 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [1 5 1]
              Start: [1 4097 1]
                End: [1024 5120 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [1 6 1]
              Start: [1 5121 1]
                End: [1024 6144 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [2 1 1]
              Start: [1025 1 1]
                End: [2048 1024 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [2 2 1]
              Start: [1025 1025 1]
                End: [2048 2048 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [2 3 1]
              Start: [1025 2049 1]
                End: [2048 3072 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [2 4 1]
              Start: [1025 3073 1]
                End: [2048 4096 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [2 5 1]
              Start: [1025 4097 1]
                End: [2048 5120 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [2 6 1]
              Start: [1025 5121 1]
                End: [2048 6144 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [3 1 1]
              Start: [2049 1 1]
                End: [3072 1024 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [3 2 1]
              Start: [2049 1025 1]
                End: [3072 2048 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [3 3 1]
              Start: [2049 2049 1]
                End: [3072 3072 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    

    Разделите заблокированный image datastore и создайте новую blockedImageDatastore объект данных во втором разделе.

    bimdsp2 = partition(bimds, 2, 2);

    Считайте данные из второго раздела.

    disp('Partition 2');
    Partition 2
    
    while hasdata(bimdsp2)
          [data, info] = read(bimdsp2);
          disp(info);
    end
           BlockSub: [3 4 1]
              Start: [2049 3073 1]
                End: [3072 4096 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [3 5 1]
              Start: [2049 4097 1]
                End: [3072 5120 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [3 6 1]
              Start: [2049 5121 1]
                End: [3072 6144 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [4 1 1]
              Start: [3073 1 1]
                End: [4096 1024 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [4 2 1]
              Start: [3073 1025 1]
                End: [4096 2048 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [4 3 1]
              Start: [3073 2049 1]
                End: [4096 3072 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [4 4 1]
              Start: [3073 3073 1]
                End: [4096 4096 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [4 5 1]
              Start: [3073 4097 1]
                End: [4096 5120 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [4 6 1]
              Start: [3073 5121 1]
                End: [4096 6144 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [5 1 1]
              Start: [4097 1 1]
                End: [5120 1024 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [5 2 1]
              Start: [4097 1025 1]
                End: [5120 2048 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [5 3 1]
              Start: [4097 2049 1]
                End: [5120 3072 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [5 4 1]
              Start: [4097 3073 1]
                End: [5120 4096 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [5 5 1]
              Start: [4097 4097 1]
                End: [5120 5120 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    
           BlockSub: [5 6 1]
              Start: [4097 5121 1]
                End: [5120 6144 3]
              Level: 1
        ImageNumber: 1
         BorderSize: [0 0 0]
          BlockSize: [1024 1024 3]
    

    Входные параметры

    свернуть все

    Заблокированные изображения datastore, заданные как blockedImageDatastore объект.

    Количество разделов, заданное как числовой скаляр. Чтобы получить оценку разумного значения для N, используйте numpartitions функция.

    Типы данных: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

    Считываемый раздел, заданный как числовой скаляр.

    Типы данных: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical

    Выходные аргументы

    свернуть все

    Подмножество datastore, возвращаемое как blockedImageDatastore объект.

    Введенный в R2021a