App-SeismicUnixGui

 view release on metacpan or  search on metacpan

lib/App/SeismicUnixGui/specs/plot/suximage_spec.pm  view on Meta::CPAN


# print("suximage_spec, _incompatibles: @{$suximage_spec->{_incompatibles}} \n");

=head2 sub binding_index_aref

curve, item index = 8, bound to $DATA_SEISMIC_TXT
curvefile, item index = 10, bound to $DATA_SEISMIC_TXT
picks/mpicks, item index = 35, bound to PL_SEISMIC by default

=cut

sub binding_index_aref {

	my ($self) = @_;

	my @index;

	$index[0] = 8;
	$index[1] = 10;
	$index[2] = 35;

	$suximage_spec->{_binding_index_aref} = \@index;

	return ();
}

=head2 sub get_max_index

=cut

sub get_max_index {
	my ($self) = @_;

	if ( $suximage_spec->{_max_index} ) {

		my $max_idx = $suximage->get_max_index();
		return ($max_idx);

	}
	else {
		print("suximage_spec, get_max_index, missing max_index\n");
		return ();
	}
}

=head2 sub set_good_labels       
	 
	set value labels that are good

=cut

sub set_good_labels {
	my ( $self, $good_labels_aref ) = @_;

	$suximage_spec->{_good_labels_aref} = $good_labels_aref;

	return ();
}

=head2 sub find_incompatibles
	not_compatible for the following cases
	is_absclip && (is_loclip || is_hiclip)
	     1             1         
	 
	set value labels that are good

=cut

sub set_incompatibles {
	my ($self) = @_;

	my @good_labels_aref = $suximage_spec->{_good_labels_aref};

	my $length = scalar @good_labels_aref;

	for ( my $j = 0; $j < $length; $j++ ) {

		my $good_label = $good_labels_aref[$j];

		if ( $good_label eq 'absclip' ) {
			$is_absclip = $true;

		}
		elsif ( $good_label eq 'hiclip' ) {
			$is_hiclip = $true;

		}
		elsif ( $good_label eq 'loclip' ) {
			$is_loclip = $true;

		}
		else {
			print("suximage_spec, set_incompatibles, NONE \n");
		}
	}

}

#=head2  sub get_incompatible
#
#	parameters
#
#=cut
#
#sub get_incompatibles {
#	my ($self) = @_;
#
#	my (@needed);
#	my @_need_both		= ();
#	my @_need_only_1	= ();
#	my @_none_needed 	= ();
#	my @_all_needed	 	= ();
#
#	my $params = {
#		_need_both		=> \@_need_both,
#		_need_only_1	=> \@_need_only_1,
#		_none_needed	=> \@_none_needed,
#		_all_needed		=> \@_all_needed,
#	};
#
#	#my $number_groups  = 6;
#
#	my @of_two          		= 	('clip','wperc');
#	push @{$params->{_need_only_1}}	,	\@of_two;
#
#
#
##	print("sugain, get_incomatpibles  $length \n");
#
#	my $len_1_needed = scalar @{$params->{_need_only_1}};
#
#	for (my $i=0; $i < $len_1_needed; $i++) {
#
#		print("sugain, get_incompatibles,need_only_1:  @{@{$params->{_need_only_1}}[$i]}\n");
#
#	}
#
##	print("sugain, get_incomatpibles only_one: @only_one\n");
#
#
#	return($params);
#
#}
#
#
# }
#
#=head2 sub get_incompatibles
#	not_compatible for the following cases
#	is_absclip && (is_loclip || is_hiclip)
#	     1             1
#
#	set value labels that are good
#
#=cut
#
#sub get_incompatibles {
#
#	my ($self) 	= @_;
#
#	if ($is_absclip && ($is_loclip || $is_hiclip)) {
#		print("Warning: Can not have absclip and (hiclip or loclip)\n");
#		return();
#	} else {
#		print("No incompatibles\n");
#	}
# }
#

=head2 sub get_binding_index_aref

=cut

sub get_binding_index_aref {
	my ($self) = @_;
	my @index;

	if ( $suximage_spec->{_binding_index_aref} ) {
		my $index_aref = $suximage_spec->{_binding_index_aref};
		return ($index_aref);

	}
	else {
		print(
			"suximage_spec, get_binding_index_aref, missing binding_index_aref\n"
		);
		return ();
	}

	my $index_aref = $suximage_spec->{_binding_index_aref};

}

=head2 sub file_dialog_type_aref

  type of dialog (Data, Flow, SaveAs) is needed by binding
  one type of dialog for each index

=cut 

sub file_dialog_type_aref {
	my ($self) = @_;

	my @type;

	$type[0] = $file_dialog_type->{_Data};
	$type[1] = $file_dialog_type->{_Data};
	$type[2] = $file_dialog_type->{_Data};    # mpicks bound to PL_SEISMIC directory



( run in 1.176 second using v1.01-cache-2.11-cpan-39bf76dae61 )