ImageReader.st
changeset 8026 532ccce8b1fd
parent 7929 576cffea9ac5
child 8060 009e27b016b1
equal deleted inserted replaced
8025:2e4d3fedcbd3 8026:532ccce8b1fd
  1958 
  1958 
  1959     |image depth|
  1959     |image depth|
  1960 
  1960 
  1961     depth := self bitsPerPixel.
  1961     depth := self bitsPerPixel.
  1962     (depth notNil and:[data notNil]) ifTrue:[
  1962     (depth notNil and:[data notNil]) ifTrue:[
  1963 	image := Image newForDepth:depth.
  1963         image := Image newForDepth:depth.
  1964 	image depth:depth.
  1964         image depth:depth.
  1965 	inStream isFileStream ifTrue:[
  1965         inStream isFileStream ifTrue:[
  1966 	    image fileName:inStream pathName.
  1966             image fileName:inStream pathName.
  1967 	].
  1967         ].
  1968 	image
  1968         image
  1969 	    width:width
  1969             width:width
  1970 	    height:height
  1970             height:height
  1971 	    photometric:photometric
  1971             photometric:photometric
  1972 	    samplesPerPixel:samplesPerPixel
  1972             samplesPerPixel:samplesPerPixel
  1973 	    bitsPerSample:bitsPerSample
  1973             bitsPerSample:bitsPerSample
  1974 	    colorMap:colorMap
  1974             colorMap:colorMap
  1975 	    bits:data
  1975             bits:data
  1976 	    mask:mask.
  1976             mask:mask.
  1977 
  1977 
  1978 	imageSequence notNil ifTrue:[
  1978         imageSequence notNil ifTrue:[
  1979 	    image imageSequence:imageSequence.
  1979             image imageSequence:imageSequence.
  1980 	].
  1980         ].
  1981 	(metaData notNil and:[metaData notEmpty]) ifTrue:[
  1981         metaData notEmptyOrNil ifTrue:[
  1982 	    image metaData:metaData
  1982             image metaData:metaData
  1983 	].
  1983         ].
  1984     ].
  1984     ].
  1985     ^ image
  1985     ^ image
  1986 
  1986 
  1987     "Modified: / 15.1.1998 / 15:46:24 / stefan"
  1987     "Modified: / 15-01-1998 / 15:46:24 / stefan"
  1988     "Created: / 1.4.1998 / 14:09:45 / cg"
  1988     "Created: / 01-04-1998 / 14:09:45 / cg"
  1989     "Modified: / 1.4.1998 / 14:41:35 / cg"
  1989     "Modified: / 17-05-2017 / 14:37:16 / mawalch"
  1990 !
  1990 !
  1991 
  1991 
  1992 mask
  1992 mask
  1993     "return the image mask (or nil)"
  1993     "return the image mask (or nil)"
  1994 
  1994