isequal
(To be removed) Compare two bigimage objects for
      equality
The isequal function of the bigimage object will be
      removed in a future release. Use the blockedImage object
      instead. For more information, see Version History.
Description
tf = isequal(bigimg1,bigimg2)true if big images bigimg1 and
          bigimg2 have the same spatial referencing, underlying data type, and
        block size. Pixel values are only compared if the metadata is equal, and the comparison ends
        early when unequal pixel values are found. isequal does not consider file
        names, masks, and other class properties.
Input Arguments
Output Arguments
Version History
Introduced in R2019bThe isequal function issues a warning that it will be removed
        in a future release.
The bigimage object and this function will be removed in a future
        release. Use blockedImage
        objects instead. You can compare the equality of two blockedImage objects
        using the isequal function that ships in MATLAB®.
The functions can return different results because they compare different properties of
        the objects. The bigimage
        isequal function does not consider file names, masks, and other class
        properties when evaluating the equality of two bigimage objects. In
        contrast, the MATLAB
        isequal function considers all object properties when evaluating the
        equality of objects, including the image filenames. Therefore, the MATLAB
        isequal function determines that blockedImage objects
        are not equal in more situations than the bigimage
        isequal function.
To update your code, first create two blockedImage objects to read your
        image data. If you want to reproduce the behavior of the bigimage object,
        then follow these steps:
- Compare the equality of the relevant properties, such as the - Channels,- ClassUnderlying, and- BlockSizeproperties. Although the- blockedImageobject does not have a- SpatialReferencingproperty, you can compare related properties such as- WorldStartand- WorldEnd.
- If any of these properties are not equal between the two objects, then the objects are not equal. 
- If all of these properties are equal between the two objects, then you can compare the data at each resolution level. Read the data using - blockedImageDatastoreobjects, and determine the data equality using the MATLAB- isequalfunction. To perform the comparison efficiently, start by comparing data at the coarsest resolution level and then compare data at increasingly fine resolution levels.
- If any block of read data is not equal between the two objects, then the objects are not equal. Otherwise, the objects are equal. 
| Discouraged Usage | Recommended Replacement | 
|---|---|
| This example uses the  
 filename = "tumor_091R.tif";
bim1 = bigimage(filename,BlockSize=[100 100]);
bim2 = bigimage(filename,BlockSize=[200 200]);
tf = isequal(bim1,bim2); | Here is approximately equivalent code comparing two
                     filename = "tumor_091R.tif";
bim1 = blockedImage(filename,BlockSize=[100 100]);
bim2 = blockedImage(filename,BlockSize=[200 200]);
tf = isequal(bim1,bim2); | 
| Here is approximately equivalent code comparing two
                     First, compare properties of
                  the  filename = "tumor_091R.tif"; bim1 = blockedImage(filename,BlockSize=[100 100]); bim2 = blockedImage(filename,BlockSize=[200 200]); tf = isequal(bim1.WorldStart,bim2.WorldStart) ... && isequal(bim1.WorldEnd,bim2.WorldEnd) ... && isequal(bim1.Size,bim2.Size) ... && isequal(bim1.NumLevels,bim2.NumLevels) ... && isequal(bim1.Channels,bim2.Channels) ... && isequal(bim1.ClassUnderlying,bim2.ClassUnderlying) ... && isequal(bim1.BlockSize,bim2.BlockSize); If these properties are equal, then you can compare the data for each resolution level. for lvl = bim1.NumLevels:-1:1 ds1 = blockedImageDatastore(bim1,lvl); ds2 = blockedImageDatastore(bim2,lvl); while tf && hasdata(ds1) && hasdata(ds2) tf = isequal(read(ds1),read(ds2)); end end If  | 
The isequal function of the bigimage object is not
        recommended. Use a blockedImage
        object instead. The
        blockedImage object offers several advantages including extension to N-D
    processing, a simpler interface, and custom support for reading and writing nonstandard image
    formats.
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)