Class: Rafflesia::MapModelFitDensityGeometry
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::MapModelFitDensityGeometry
- Defined in:
- lib/rafflesia/maps/map_model_fit_density_geometry.rb
Constant Summary collapse
- HASH_ATTRS =
{ above_threshold_voxel_count: :above_threshold_voxel_count, geometry_sampling_stride: :geometry_sampling_stride, geometry_threshold: :geometry_threshold, weighted_density_centroid: :weighted_density_centroid, weighted_principal_axes: :weighted_principal_axes, world_bounds_maximum: :world_bounds_maximum, world_bounds_minimum: :world_bounds_minimum }.freeze
Instance Attribute Summary collapse
-
#above_threshold_voxel_count ⇒ Object
Returns the value of attribute above_threshold_voxel_count.
-
#geometry_sampling_stride ⇒ Object
Returns the value of attribute geometry_sampling_stride.
-
#geometry_threshold ⇒ Object
Returns the value of attribute geometry_threshold.
-
#weighted_density_centroid ⇒ Object
Returns the value of attribute weighted_density_centroid.
-
#weighted_principal_axes ⇒ Object
Returns the value of attribute weighted_principal_axes.
-
#world_bounds_maximum ⇒ Object
Returns the value of attribute world_bounds_maximum.
-
#world_bounds_minimum ⇒ Object
Returns the value of attribute world_bounds_minimum.
Instance Method Summary collapse
-
#initialize(json) ⇒ MapModelFitDensityGeometry
constructor
A new instance of MapModelFitDensityGeometry.
Constructor Details
#initialize(json) ⇒ MapModelFitDensityGeometry
Returns a new instance of MapModelFitDensityGeometry.
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/rafflesia/maps/map_model_fit_density_geometry.rb', line 27 def initialize(json) super() hash = self.class.normalize(json) @above_threshold_voxel_count = hash[:above_threshold_voxel_count] @geometry_sampling_stride = hash[:geometry_sampling_stride] @geometry_threshold = hash[:geometry_threshold] @weighted_density_centroid = (hash[:weighted_density_centroid] || []) @weighted_principal_axes = (hash[:weighted_principal_axes] || []).map { |item| item ? Rafflesia::StructurePrincipalAxis.new(item) : nil } @world_bounds_maximum = (hash[:world_bounds_maximum] || []) @world_bounds_minimum = (hash[:world_bounds_minimum] || []) end |
Instance Attribute Details
#above_threshold_voxel_count ⇒ Object
Returns the value of attribute above_threshold_voxel_count.
18 19 20 |
# File 'lib/rafflesia/maps/map_model_fit_density_geometry.rb', line 18 def above_threshold_voxel_count @above_threshold_voxel_count end |
#geometry_sampling_stride ⇒ Object
Returns the value of attribute geometry_sampling_stride.
18 19 20 |
# File 'lib/rafflesia/maps/map_model_fit_density_geometry.rb', line 18 def geometry_sampling_stride @geometry_sampling_stride end |
#geometry_threshold ⇒ Object
Returns the value of attribute geometry_threshold.
18 19 20 |
# File 'lib/rafflesia/maps/map_model_fit_density_geometry.rb', line 18 def geometry_threshold @geometry_threshold end |
#weighted_density_centroid ⇒ Object
Returns the value of attribute weighted_density_centroid.
18 19 20 |
# File 'lib/rafflesia/maps/map_model_fit_density_geometry.rb', line 18 def weighted_density_centroid @weighted_density_centroid end |
#weighted_principal_axes ⇒ Object
Returns the value of attribute weighted_principal_axes.
18 19 20 |
# File 'lib/rafflesia/maps/map_model_fit_density_geometry.rb', line 18 def weighted_principal_axes @weighted_principal_axes end |
#world_bounds_maximum ⇒ Object
Returns the value of attribute world_bounds_maximum.
18 19 20 |
# File 'lib/rafflesia/maps/map_model_fit_density_geometry.rb', line 18 def world_bounds_maximum @world_bounds_maximum end |
#world_bounds_minimum ⇒ Object
Returns the value of attribute world_bounds_minimum.
18 19 20 |
# File 'lib/rafflesia/maps/map_model_fit_density_geometry.rb', line 18 def world_bounds_minimum @world_bounds_minimum end |