#NEWLINE# def compute( self ) : #NEWLINE# #INDENT# dim = self . get_input ( 'Dimension' ) #NEWLINE# outPixelType = self . get_input ( 'Pixel Type' ) #NEWLINE# fn = self . get_input ( 'Filename' ) #NEWLINE# self . reader = itk . ImageFileReader [ itk . Image [ ( outPixelType . _type , dim ) ] ] . New ( ) #NEWLINE# self . reader . SetFileName ( fn ) #NEWLINE# self . reader . Update ( ) #NEWLINE# outIm = Image ( ) #NEWLINE# outIm . setImg ( self . reader . GetOutput ( ) ) #NEWLINE# outIm . setPixelType ( outPixelType ) #NEWLINE# outIm . setDim ( dim ) #NEWLINE# self . set_output ( 'Image' , outIm ) #NEWLINE# self . set_output ( 'Reader' , self )