public void SetBlockDimensions(PhysicalDimensions pd) { if (!textBoxXOrigin_isDirty) { textBoxXOrigin.Text = "" + pd.originX; } if (!textBoxYOrigin_isDirty) { textBoxYOrigin.Text = "" + pd.originY; } if (!textBoxZOrigin_isDirty) { textBoxZOrigin.Text = "" + pd.originZ; } if (!textBoxXWidth_isDirty) { textBoxXWidth.Text = "" + pd.blockXWidth; } if (!textBoxYWidth_isDirty) { textBoxYWidth.Text = "" + pd.blockYWidth; } if (!textBoxZWidth_isDirty) { textBoxZWidth.Text = "" + pd.blockZWidth; } }
public PhysicalDimensions GetBlockDimensions(){ PhysicalDimensions pd = new PhysicalDimensions(); pd.originX = GetValAsDouble(textBoxXOrigin); pd.originY = GetValAsDouble(textBoxYOrigin); pd.originZ = GetValAsDouble(textBoxZOrigin); pd.blockXWidth = GetValAsDouble(textBoxXWidth); pd.blockYWidth = GetValAsDouble(textBoxYWidth); pd.blockZWidth = GetValAsDouble(textBoxZWidth); return pd; }
internal PhysicalDimensions QueryLocationColumns(int xCol, int yCol, int zCol, DataRecords.ColumnManager columnManager) { ColumnStats x = columnManager.GetXYZColumnData(xCol); ColumnStats y = columnManager.GetXYZColumnData(yCol); ColumnStats z = columnManager.GetXYZColumnData(zCol); PhysicalDimensions dim = new PhysicalDimensions(); dim.originX = x.min; dim.originY = y.min; dim.originZ = z.min; dim.maximumX = x.max; dim.maximumY = y.max; dim.maximumZ = z.max; return dim; }
private void PresetDimensionData(ImportDataMap impMap) { var rawFileReader = new RawFileReader((SelectedFile.ToLower().IndexOf(".csv") > -1) ? ',' : '\t'); int cxColumnID = impMap.GetColumnIDMappedTo("CentroidX"); int cyColumnID = impMap.GetColumnIDMappedTo("CentroidY"); int czColumnID = impMap.GetColumnIDMappedTo("CentroidZ"); int xincColumnID = impMap.GetColumnIDMappedTo("LegthX"); int yincColumnID = impMap.GetColumnIDMappedTo("LengthY"); int zincColumnID = impMap.GetColumnIDMappedTo("LengthZ"); PhysicalDimensions pd = new PhysicalDimensions(); if (cxColumnID > -1) { ColumnStats xOrigin = rawFileReader.GetDimensions(cxColumnID); pd.originX = xOrigin.min; } if (cyColumnID > -1) { ColumnStats yOrigin = rawFileReader.GetDimensions(cyColumnID); pd.originY = yOrigin.min; } if (czColumnID > -1) { ColumnStats zOrigin = rawFileReader.GetDimensions(czColumnID); pd.originZ = zOrigin.min; } if (xincColumnID > -1) { ColumnStats xInc = rawFileReader.GetDimensions(xincColumnID); pd.blockXWidth = xInc.max; } if (yincColumnID > -1) { ColumnStats yInc = rawFileReader.GetDimensions(yincColumnID); pd.blockYWidth = yInc.max; } if (zincColumnID > -1) { ColumnStats zInc = rawFileReader.GetDimensions(zincColumnID); pd.blockZWidth = zInc.max; } BlockDimensionsControl.SetBlockDimensions(pd); }