public void SetInputData(cSingleChannelImage InputImage) { this.Input = InputImage; base.Title += ": " + Input.Name; this.InputVolume = new cVolumeRendering3D(InputImage, new Classes._3D.cPoint3D(0, 0, 0),null, null); }
public FormFor3DVolumeDisplayParam(cVolumeRendering3D Object3D) { this.Object3D = Object3D; InitializeComponent(); this.Text += " - " + Object3D.GetName(); this.numericUpDownPosX.ValueChanged -= new EventHandler(numericUpDownPosX_ValueChanged); this.numericUpDownPosY.ValueChanged -= new EventHandler(numericUpDownPosY_ValueChanged); this.numericUpDownPosZ.ValueChanged -= new EventHandler(numericUpDownPosZ_ValueChanged); this.numericUpDownOpacityMinPos.ValueChanged -= new EventHandler(numericUpDownOpacityMinPos_ValueChanged); this.numericUpDownOpacityMaxPos.ValueChanged -= new EventHandler(numericUpDownOpacityMaxPos_ValueChanged); this.numericUpDownOpacityMaxValue.ValueChanged -= new EventHandler(numericUpDownOpacityMaxValue_ValueChanged); this.numericUpDownOpacityMinValue.ValueChanged -= new EventHandler(numericUpDownOpacityMinValue_ValueChanged); this.numericUpDownColorMinPos.ValueChanged -= new EventHandler(numericUpDownColorMinPos_ValueChanged); this.numericUpDownColorMaxPos.ValueChanged -= new EventHandler(numericUpDownColorMaxPos_ValueChanged); //Object3D.opacityTransferFunction.GetValue(); this.numericUpDownColorMinPos.Value = this.numericUpDownOpacityMinPos.Value = (decimal)Object3D.range[0]; this.numericUpDownColorMaxPos.Value = this.numericUpDownOpacityMaxPos.Value = (decimal)Object3D.range[1]; this.numericUpDownOpacityMaxValue.Value = (decimal)Object3D.opacityTransferFunction.GetValue(Object3D.range[1]); this.numericUpDownOpacityMinValue.Value = (decimal)Object3D.opacityTransferFunction.GetValue(Object3D.range[0]); this.panelColor.BackColor = Color.FromArgb((int)(Object3D.ColorTransferFunction.GetRedValue(Object3D.range[0]) * 255), (int)(Object3D.ColorTransferFunction.GetGreenValue(Object3D.range[0]) * 255), (int)(Object3D.ColorTransferFunction.GetBlueValue(Object3D.range[0]) * 255)); this.panelColorLast.BackColor = Color.FromArgb((int)(Object3D.ColorTransferFunction.GetRedValue(Object3D.range[1]) * 255), (int)(Object3D.ColorTransferFunction.GetGreenValue(Object3D.range[1]) * 255), (int)(Object3D.ColorTransferFunction.GetBlueValue(Object3D.range[1]) * 255)); //Object3D.C if (this.Object3D.volumeProperty.GetInterpolationTypeAsString() == "Nearest Neighbor") { this.radioButtonInterpolationNN.Checked = true; this.radioButtonInterpolationLinear.Checked = false; } else { this.radioButtonInterpolationNN.Checked = false; this.radioButtonInterpolationLinear.Checked = true; } //else if (this.Object3D.GetMode() == eMesh3DMode.WIREFRAME) //{ // this.radioButtonSolid.Checked = false; // this.radioButtonWireFrame.Checked = true; // this.radioButtonPoint.Checked = false; //} //else //{ // this.radioButtonSolid.Checked = false; // this.radioButtonWireFrame.Checked = false; // this.radioButtonPoint.Checked = true; //} //this.radioButtonSolid.CheckedChanged += new EventHandler(radioButtonSolid_CheckedChanged); //this.radioButtonWireFrame.CheckedChanged += new EventHandler(radioButtonWireFrame_CheckedChanged); //this.radioButtonPoint.CheckedChanged += new EventHandler(radioButtonPoint_CheckedChanged); this.numericUpDownPosX.Value = (decimal)Object3D.GetPosition().X; this.numericUpDownPosY.Value = (decimal)Object3D.GetPosition().Y; this.numericUpDownPosZ.Value = (decimal)Object3D.GetPosition().Z; //this.numericUpDownOpacity.Value = (decimal)Object3D.GetOpacity(); this.numericUpDownPosX.ValueChanged += new EventHandler(numericUpDownPosX_ValueChanged); this.numericUpDownPosY.ValueChanged += new EventHandler(numericUpDownPosY_ValueChanged); this.numericUpDownPosZ.ValueChanged += new EventHandler(numericUpDownPosZ_ValueChanged); this.numericUpDownColorMinPos.ValueChanged -= new EventHandler(numericUpDownColorMinPos_ValueChanged); this.numericUpDownColorMaxPos.ValueChanged -= new EventHandler(numericUpDownColorMaxPos_ValueChanged); this.numericUpDownOpacityMinPos.ValueChanged += new EventHandler(numericUpDownOpacityMinPos_ValueChanged); this.numericUpDownOpacityMaxPos.ValueChanged += new EventHandler(numericUpDownOpacityMaxPos_ValueChanged); this.numericUpDownOpacityMaxValue.ValueChanged += new EventHandler(numericUpDownOpacityMaxValue_ValueChanged); this.numericUpDownOpacityMinValue.ValueChanged += new EventHandler(numericUpDownOpacityMinValue_ValueChanged); //this.panelColor.BackColor = Object3D.Colour; }
public void SetInputData(cVolumeRendering3D InputVolume) { // base.Title += ": " + InputVolume.Name; this.InputVolume = InputVolume; }
public void AddVolume3D(cVolumeRendering3D Volume3D) { Volume3D.AssociatedWorld = this; ListVolume.Add(Volume3D); if (AssociatedVTKRenderer != null) AssociatedVTKRenderer.AddViewProp(Volume3D.vtk_volume); // Volume3D.AddMeToTheWorld(ren1, FirstColor, LastColor); }