Exemple #1
0
		private void CreateGroups()
		{
			ChannelGroup grp = null;
			string nm = "";
			Array.Resize(ref rowGroups, 14);
			Array.Resize(ref colGroups, 8);
			seq = new Sequence4(lastFile);
			treeTrack = seq.CreateTrack("Tree Pixels [U7.001-U8-388");
			masterRowGroup = seq.CreateChannelGroup("Tree Pixels by Row");
			masterColGroup = seq.CreateChannelGroup("Tree Pixels by Column");
			treeTrack.AddItem(masterRowGroup);
			treeTrack.AddItem(masterColGroup);
			for (int r = 0; r < 14; r++)
			{
				nm = "Tree Pixels Row " + (r + 1).ToString();
				grp = seq.CreateChannelGroup(nm);
				rowGroups[r] = grp;
				masterRowGroup.AddItem(grp);
			}
			for (int c = 0; c < 8; c++)
			{
				nm = "Tree Pixels Column " + (c + 1).ToString();
				nm += " {" + DirName(c + 1) + "}";
				string f = FaceName(c + 1);
				if (f.Length > 0)
				{
					nm += "{" + f + "}";
				}
				grp = seq.CreateChannelGroup(nm);
				colGroups[c] = grp;
				masterColGroup.AddItem(grp);
			}




		}
Exemple #2
0
		} // end btnMake_Click()

		private void BuildShip()
		{
			/////////////////////////////////////////////////////////////
			//
			//   Batch 3 IS THE AIRSHIP PROJECTOR
			//   DONE AS MATRIX   ~~  x Columns by Y Rows
			//   Grouped by Column and by Row
			
			pixelNum = 0;
			airCols = Int16.Parse(txtAirCols.Text);
			airRows = Int16.Parse(txtAirRows.Text);
			int totalrgbChs = airRows * airCols;
			int totalChans = totalrgbChs * 3;
			universeNum = (int)numUnivAirship.Value;
			int airCol = 1;
			string baseName = txtAirName.Text;
			reversed = false;

			//Array.Resize(ref chanMatrix[], sections, pixelsPerSect);
			chanMatrix = new RGBchannel[airCols, airRows];
			//colGroups = new ChannelGroup[airCols];
			//rowGroups = new ChannelGroup[airRows];

			sectionName = baseName + " [U" + universeNum.ToString();
			sectionName += ".001-U" + (universeNum).ToString() + ".";
			sectionName += (64 * 3).ToString() + "]";
			int tknum = int.Parse(txtTrack.Text);
			Track trak = seq.CreateTrack(sectionName);

			sectionName = baseName + " by Column [U" + universeNum.ToString();
			sectionName += ".001-U" + (universeNum).ToString() + ".";
			sectionName += (64 * 3).ToString() + "]";
			ChannelGroup grpCols = seq.CreateChannelGroup(sectionName);
			trak.AddItem(grpCols);

			sectionName = baseName + " by Row [U" + universeNum.ToString();
			sectionName += ".001-U" + (universeNum).ToString() + ".";
			sectionName += (64 * 3).ToString() + "]";
			ChannelGroup grpRows = seq.CreateChannelGroup(sectionName);
			trak.AddItem(grpRows);




			sectionName = baseName;
			sectionNum = 1;
			pixelNum = 1;
			chanNum = 1;
			batchStart = Int16.Parse(txtFenceStartCh.Text);
			batchEnd = Int16.Parse(txtFenceSections.Text);
			chIncr = 1;

			if (optRGB3.Checked) chOrder = 1;
			if (optGRB3.Checked) chOrder = 2;

			// Sections
			for (int c = 0; c < airCols; c++)
			{
				//TODO: Reverse Order
				// Use just forward order for now
				ChannelGroup theGroup = AddAirColumn(c);
				grpCols.AddItem(theGroup);
			}


			// Create the second major group
			// Another copy of the matrix, but pivoted
			// Grouped by Row instead of by Column
			for (int r = 0; r < airRows; r++)
			{
				string grName = sectionName + " Row " + (r).ToString("0");
				ChannelGroup theGroup = seq.CreateChannelGroup(grName);
				for (int c = 0; c < airCols; c++)
				{
					theGroup.AddItem(chanMatrix[c, r]);
				}
				grpRows.AddItem(theGroup);

			}


		} // end btnMake_Click()
Exemple #3
0
		private void BuildTreeOld()
		{
			/////////////////////////////////////////////////////////////
			//
			//   Batch 2 IS THE BIG CENTER PIXEL TREE
			//   DONE AS MATRIX   ~~  Initially with 12 rows with 28 pixels each
			//   For a total of 340 pixels (2 full universes)
			//   Each row has 8 sections with initially 3 or 4 pixels on each row.
			//   Once the tree is built and tested, pixels will get moved to the row
			//   and section they actually end up in

			pixelNum = 1;
			rows = int.Parse(txtTreeRows.Text);
			pixelsPerRow = int.Parse(txtTreeCols.Text);
			int totalrgbChs = rows * pixelsPerRow;
			int totalChans = totalrgbChs * 3;
			universeNum = (int)numTreeUniverse.Value;
			int sectNum = 1;
			string baseName = txtTreeBaseName.Text;
			reversed = optTreeReverse.Checked;

			chanMatrix = new RGBchannel[rows, pixelsPerRow];
			sectionGroups = new ChannelGroup[rows];
			pixelGroups = new ChannelGroup[pixelsPerRow];

			sectionName = baseName + "s [U" + universeNum.ToString();
			sectionName += ".001-U" + (universeNum + 1).ToString() + ".";
			sectionName += (MAX_CH_PER_UNIV).ToString() + "]";
			int tknum = int.Parse(txtTrack.Text);
			Track trak = seq.CreateTrack(sectionName);

			sectionName = baseName + "s by Row [U" + universeNum.ToString();
			sectionName += ".001-U" + (universeNum + 1).ToString() + ".";
			sectionName += (MAX_CH_PER_UNIV).ToString() + "]";
			ChannelGroup grpRows = seq.CreateChannelGroup(sectionName);
			trak.AddItem(grpRows);

			sectionName = baseName + "s by Section [U" + universeNum.ToString();
			sectionName += ".001-U" + (universeNum + 1).ToString() + ".";
			sectionName += (MAX_CH_PER_UNIV).ToString() + "]";
			ChannelGroup grpCols = seq.CreateChannelGroup(sectionName);
			trak.AddItem(grpCols);

			int direction = 1; // forward, set to -1 for reverse


			sectionName = baseName;
			sectionNum = 1;
			pixelNum = 1;
			if (optTreeReverse.Checked)
			{
				universeNum++;
				int n1 = totalrgbChs - 160;
				int n2 = n1 * 3 - 2;
				chanNum = n2;
				batchStart = Int16.Parse(txtFenceStartCh.Text);
				batchEnd = Int16.Parse(txtFenceStartCh.Text);
				chIncr = -1;
			}
			else
			{
				chanNum = 1;
				batchStart = Int16.Parse(txtFenceStartCh.Text);
				batchEnd = Int16.Parse(txtFenceSections.Text);
				chIncr = 1;
			}

			if (optTreeRGB.Checked) chOrder = 1;
			if (optTreeGRB.Checked) chOrder = 2;

			for (int r = 0; r < rows; r++)
			{
				//TODO: Reverse Order
				// Use just forward order for now
				//ChannelGroup theGroup = AddRow(r);
				//grpRows.AddItem(theGroup);
			}

			for (int pxl = 0; pxl < pixelsPerRow; pxl++)
			{
				string grName = sectionName + "s Section " + pxl.ToString("00");
				ChannelGroup theGroup = seq.CreateChannelGroup(grName);
				for (int row = 0; row < rows; row++)
				{
					theGroup.AddItem(chanMatrix[row, pxl]);
				}
				grpCols.AddItem(theGroup);

			}


		} // end btnMake_Click()
Exemple #4
0
		private void BuildFence()
		{
			/////////////////////////////////////////////////////////////
			//
			//   Batch 1 IS THE PERIMETER FENCE
			//   DONE AS MATRIX   ~~  x Sections by Y rgbChs-per-section
			//   Grouped by Section, and
			//   Grouped by rgbCh # (per section)

			pixelNum = 1;
			sections = Int16.Parse(txtFenceSections.Text);
			pixelsPerSect = Int16.Parse(txtFenseSectionSize.Text);
			int totalrgbChs = sections * pixelsPerSect;
			int totalChans = totalrgbChs * 3;
			universeNum = (int)numFenceUniverse.Value;
			int sectNum = 1;
			string baseName = txtFenceBaseName.Text;
			reversed = optFenceReverse.Checked;

			//Array.Resize(ref chanMatrix[], sections, pixelsPerSect);
			chanMatrix = new RGBchannel[sections, pixelsPerSect];
			sectionGroups = new ChannelGroup[sections];
			pixelGroups = new ChannelGroup[pixelsPerSect];

			sectionName = baseName + "s [U" + universeNum.ToString();
			sectionName += ".001-U" + (universeNum + 1).ToString() + ".";
			sectionName += (166 * 3).ToString() + "]";
			int tknum = int.Parse(txtTrack.Text);
			Track trak = seq.CreateTrack(sectionName);

			sectionName = baseName + "s by Section [U" + universeNum.ToString();
			sectionName += ".001-U" + (universeNum + 1).ToString() + ".";
			sectionName += (166 * 3).ToString() + "]";
			ChannelGroup grpSects =  seq.CreateChannelGroup(sectionName);
			trak.AddItem(grpSects);

			sectionName = baseName + "s by rgbCh # [U" + universeNum.ToString();
			sectionName += ".001-U" + (universeNum + 1).ToString() + ".";
			sectionName += (166 * 3).ToString() + "]";
			ChannelGroup grpPixels = seq.CreateChannelGroup(sectionName);
			trak.AddItem(grpPixels);

			


			sectionName = baseName;
			sectionNum = 1;
			pixelNum = 1;
			if (optFenceReverse.Checked)
			{
				universeNum++;
				int n1 = totalrgbChs - MAX_PIX_PER_UNIV;
				int n2 = n1 * 3 - 2;
				chanNum = n2;
				batchStart = Int16.Parse(txtFenceStartCh.Text);
				batchEnd = Int16.Parse(txtFenceStartCh.Text);
				chIncr = -1;
			}
			else
			{
				chanNum = 1;
				batchStart = Int16.Parse(txtFenceStartCh.Text);
				batchEnd = Int16.Parse(txtFenceSections.Text);
				chIncr = 1;
			}
				
			if (optFenceRGB.Checked) chOrder = 1;
			if (optFenceGRB.Checked) chOrder = 2;

			// Sections
			for (int sect = 0; sect < sections; sect++)
			{
				//TODO: Reverse Order
				// Use just forward order for now
				ChannelGroup theGroup = AddSection(sect);
				grpSects.AddItem(theGroup);
			}


			// Create the second major group
			// Another copy of the matrix, but pivoted
			// Grouped by rgbCh # instead of by sectioon #
			for (int pxl = 0; pxl < pixelsPerSect; pxl++)
			{
				string grName = sectionName + "s #" + (pxl+1).ToString("00") + "s";
				ChannelGroup theGroup = seq.CreateChannelGroup(grName);
				for (int s=0; s< sections; s++)
				{
					theGroup.AddItem(chanMatrix[s, pxl]);
				}
				grpPixels.AddItem(theGroup);

			}

			
		} // end btnMake_Click()