/// <summary> /// The DatasetDescriptor constructor. /// </summary> /// <param name="nID">Specifies the database ID of the item.</param> /// <param name="strName">Specifies the name of the item.</param> /// <param name="grpModel">Specifies the group of the model.</param> /// <param name="grpDs">Specifies the group of the dataset.</param> /// <param name="srcTrain">Specifies the data source for training.</param> /// <param name="srcTest">Specifies the data source for testing.</param> /// <param name="strCreatorName">Specifies the dataset creator name.</param> /// <param name="strDescription">Specifies a description of the dataset.</param> /// <param name="strOwner">Specifies the identifier of the item's owner.</param> public DatasetDescriptor(int nID, string strName, GroupDescriptor grpModel, GroupDescriptor grpDs, SourceDescriptor srcTrain, SourceDescriptor srcTest, string strCreatorName, string strDescription, string strOwner = null) : base(nID, strName, strOwner) { if (grpModel != null) { m_groupModel = new descriptors.GroupDescriptor(grpModel); } else { m_groupModel = new descriptors.GroupDescriptor(0, null, null); } if (grpDs != null) { m_groupDataset = new descriptors.GroupDescriptor(grpDs); } else { m_groupDataset = new descriptors.GroupDescriptor(0, null, null); } if (srcTest != null) { m_srcTest = new SourceDescriptor(srcTest); } if (srcTrain != null) { m_srcTrain = new SourceDescriptor(srcTrain); } m_strDescription = strDescription; m_strCreatorName = strCreatorName; }
/// <summary> /// Copy another SourceDesciptor into this one. /// </summary> /// <param name="sd">Specifies the SourceDesciptor to copy.</param> public void Copy(SourceDescriptor sd) { base.Copy(sd); m_nImageCh = sd.m_nImageCh; m_nImageHt = sd.m_nImageHt; m_nImageWd = sd.m_nImageWd; m_bIsRealData = sd.m_bIsRealData; m_nImageCount = sd.m_nImageCount; m_nInactiveCount = sd.m_nInactiveCount; m_bSaveImagesToFile = sd.m_bSaveImagesToFile; m_nCopyOfSourceID = sd.m_nCopyOfSourceID; m_rgLabels = new List <descriptors.LabelDescriptor>(); foreach (LabelDescriptor ld in sd.m_rgLabels) { m_rgLabels.Add(new descriptors.LabelDescriptor(ld)); } m_colParameters = new descriptors.ParameterDescriptorCollection(); foreach (ParameterDescriptor p in sd.m_colParameters) { m_colParameters.Add(new ParameterDescriptor(p)); } m_strLabelCounts = sd.m_strLabelCounts; }
/// <summary> /// The SourceDescriptor constructor. /// </summary> /// <param name="s">Specifies another SourceDescriptor used to create this one.</param> public SourceDescriptor(SourceDescriptor s) : this(s.ID, s.Name, s.ImageWidth, s.ImageHeight, s.ImageChannels, s.IsRealData, s.SaveImagesToFile, s.CopyOfSourceID, s.Owner, s.ImageCount, s.Labels, s.LabelCountsAsText) { m_colParameters = new descriptors.ParameterDescriptorCollection(); foreach (ParameterDescriptor p in s.m_colParameters) { m_colParameters.Add(new ParameterDescriptor(p)); } }
/// <summary> /// Copy another DatasetDesciptor into this one. /// </summary> /// <param name="ds">Specifies the DatasetDesciptor to copy.</param> public void Copy(DatasetDescriptor ds) { base.Copy(ds); m_gymType = ds.m_gymType; if (ds.m_srcTest != null) { m_srcTest = new SourceDescriptor(ds.m_srcTest); } else { m_srcTest = null; } if (ds.m_srcTrain != null) { m_srcTrain = new SourceDescriptor(ds.m_srcTrain); } else { m_srcTrain = null; } if (ds.m_groupDataset != null) { m_groupDataset = new GroupDescriptor(ds.m_groupDataset); } else { m_groupDataset = null; } if (ds.m_groupModel != null) { m_groupModel = new GroupDescriptor(ds.m_groupModel); } else { m_groupModel = null; } m_colParameters = new descriptors.ParameterDescriptorCollection(); foreach (ParameterDescriptor p in ds.m_colParameters) { m_colParameters.Add(new ParameterDescriptor(p)); } m_strCreatorName = ds.m_strCreatorName; m_strDescription = ds.m_strDescription; }