/usr/src/WrapITK/Tcl/Tests/DicomSliceRead.tcl is in libinsighttoolkit3-dev 3.20.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | #
# Example on the use of DicomImageIO for reading a single DICOM slice, rescale
# the intensities and save it in a different file format.
#
package require InsightToolkit
set reader [ itkImageFileReaderIUS2_New ]
set writer [ itkImageFileWriterIUC2_New ]
set filter [ itkRescaleIntensityImageFilterIUS2IUC2_New ]
set dicomIO [ itkDicomImageIO_New ]
$reader SetImageIO [ $dicomIO GetPointer ]
$filter SetInput [ $reader GetOutput ]
$writer SetInput [ $filter GetOutput ]
$filter SetOutputMinimum 0
$filter SetOutputMaximum 255
$reader SetFileName [lindex $argv 0]
$writer SetFileName [lindex $argv 1]
$writer Update
exit
|