load_pixels Subroutine

private impure subroutine load_pixels(this, file_name)

Type Bound

pixel

Arguments

Type IntentOptional Attributes Name
class(pixel), intent(inout) :: this
character(len=*), intent(in) :: file_name

Called by

proc~~load_pixels~~CalledByGraph proc~load_pixels forsvd::pixel%load_pixels program~test5 test5 program~test5->proc~load_pixels

Source Code

   impure subroutine load_pixels(this, file_name)
      class(pixel), intent(inout) :: this
      character(*), intent(in) :: file_name
      integer :: i, nunit

      allocate(this%pixels(this%nrow,this%ncol))

      open(newunit=nunit, file=trim(file_name), status='old')
      do i = 1, this%nrow
         read(nunit, *) this%pixels(i, :)
      end do
      close(nunit)

   end subroutine load_pixels