read_clip Subroutine

private subroutine read_clip(this, min_str, max_str, norm_str)

Read clipping information

Type Bound

clip_type

Arguments

Type IntentOptional Attributes Name
class(clip_type), intent(inout) :: this

Instance of the clip type

character(len=*), intent(in) :: min_str

Strings for min, max, and norm values

character(len=*), intent(in) :: max_str

Strings for min, max, and norm values

character(len=*), intent(in) :: norm_str

Strings for min, max, and norm values


Source Code

  subroutine read_clip(this, min_str, max_str, norm_str)
    !! Read clipping information
    implicit none

    ! Arguments
    class(clip_type), intent(inout) :: this
    !! Instance of the clip type
    character(*), intent(in) :: min_str, max_str, norm_str
    !! Strings for min, max, and norm values

    if(trim(min_str).ne."")then
       read(min_str,*) this%min
    else
       this%min = -huge(1._real32)
    end if
    if(trim(max_str).ne."")then
       read(max_str,*) this%max
    else
       this%max = huge(1._real32)
    end if

    if(trim(min_str).ne."".or.trim(max_str).ne."")then
       this%l_min_max = .true.
    end if
    if(trim(norm_str).ne."")then
       read(norm_str,*) this%norm
       this%l_norm = .true.
    end if

  end subroutine read_clip