public GaussianSpecification() { gaussian_spec_name = "Default gaussian gradient name"; gaussian_box_spec = new BoxSpecification(); gaussian_region_visibility = true; gaussian_spec_color = new System.Windows.Media.Color(); gaussian_spec_color = System.Windows.Media.Color.FromRgb(255, 255, 255); }
public Region(string name, RegionShape type) { region_name = name; region_type = type; region_box_spec = new BoxSpecification(); region_visibility = true; region_color = new System.Windows.Media.Color(); region_color = System.Windows.Media.Color.FromRgb(255, 255, 255); }
public Region() { region_name = "Default Region"; region_type = RegionShape.Ellipsoid; region_box_spec = new BoxSpecification(); region_visibility = true; region_color = new System.Windows.Media.Color(); region_color = System.Windows.Media.Color.FromRgb(255, 255, 255); }
// For storing the VTK transform generated by a box widget in a C# matrix public void TransferVTKBoxWidgetTransformToMatrix(BoxSpecification box_spec) { vtkMatrix4x4 vtk_matrix = vtkMatrix4x4.New(); vtkTransform vtk_transform = vtkTransform.New(); boxRep.GetTransform(vtk_transform); vtk_transform.GetMatrix(vtk_matrix); for (int ii = 0; ii < 4; ++ii) { for (int jj = 0; jj < 4; ++jj) { // Using elements Set method for property change notification box_spec.SetMatrixElement(ii, jj, vtk_matrix.GetElement(ii, jj)); } } }
// For storing the VTK transform generated by a box widget in a C# matrix public void TransferVTKBoxWidgetTransformToMatrix(BoxSpecification box_spec) { vtkMatrix4x4 vtk_matrix = vtkMatrix4x4.New(); vtkTransform vtk_transform = vtkTransform.New(); boxRep.GetTransform(vtk_transform); vtk_transform.GetMatrix(vtk_matrix); for (int ii = 0; ii < 4; ++ii) { for (int jj = 0; jj < 4; ++jj) { // Using elements Set method for property change notification box_spec.SetMatrixElement(ii,jj,vtk_matrix.GetElement(ii, jj)); } } }