class_docstr: A class to represent a dense displacement field.
class_docstr_tok: ["A","class","to","represent","a","dense","displacement","field","."]
docstr: Check if the data is a DDF.
docstr_tok: ["Check","if","the","data","is","a","DDF","."]
code: def is_ddf_shaped(data):
      """Check if the data is a DDF."""
      if isinstance(data, DisplacementField):
          return True
      if isinstance(data, Affine):
          return False
      if not hasattr(data, "shape") or len(data.shape) < 3:
          return False
      return not Affine.is_affine_shaped(data)
  
imports: from __future__ import annotations
  import warnings
  import numpy
  import torch
  import monai
  from monai.config import NdarrayOrTensor
  from monai.data.utils import AFFINE_TOL
  from monai.transforms.utils_pytorch_numpy_unification import allclose
  from monai.utils import LazyAttr, convert_to_numpy, convert_to_tensor, look_up_option
label_desc: Use image node_id 2 for calling the DisplacementField obj's underlying member method code with example usage: obj.is_ddf_shaped(data) and returns: unknown, True, False, False