static void StoreMainDicomTagsInternal(IDatabaseWrapper& database,
                                           int64_t resource,
                                           const DicomMap& tags)
    {
      DicomArray flattened(tags);

      for (size_t i = 0; i < flattened.GetSize(); i++)
      {
        const DicomElement& element = flattened.GetElement(i);
        const DicomTag& tag = element.GetTag();
        const DicomValue& value = element.GetValue();
        if (!value.IsNull() && 
            !value.IsBinary())
        {
          database.SetMainDicomTag(resource, tag, element.GetValue().GetContent());
        }
      }
    }
Exemple #2
0
String8 CameraParameters::flatten() const
{
    String8 flattened("");
    size_t size = mMap.size();

    for (size_t i = 0; i < size; i++) {
        String8 k, v;
        k = mMap.keyAt(i);
        v = mMap.valueAt(i);

        flattened += k;
        flattened += "=";
        flattened += v;
        if (i != size-1)
            flattened += ";";
    }

    return flattened;
}
Exemple #3
0
      virtual inline af::array forward_prop(const af::array& in) {
	af::array flattened=flat_batch(in).T();
	num_samples=flattened.dims(1);
	return -flattened(labels).T();
      }