[Insight-users] DicomSeriesReadImageWrite program arguments
a a
user_itk at yahoo.com.sg
Thu, 19 Feb 2004 15:51:41 +0800 (CST)
--0-1518771356-1077177101=:9970
Content-Type: multipart/alternative; boundary="0-915173548-1077177101=:9970"
--0-915173548-1077177101=:9970
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Hi Luis,
i've done what you said but there are some error when running the example, below is the command line and the error. I've built ITK 1.40, but this example was extracted from ITK 1.60(without building 1.60), is that the problem? i've also attached the CMakeCache.txt just in case.
Thanks
Regards
Michael
******************************************************************
volume is the argument for the output file
******************************************************************
C:\example1\Debug>DicomSeriesReadImageWrite.exe C:\dicom_images\mdata volume
1.3.12.2.1107.5.2.4.7368.20031130124720000021
The directory:
C:\dicom_images\mdata
Contains the following DICOM Series:
1.3.12.2.1107.5.2.4.7368.20031130124720000021
1.3.12.2.1107.5.2.4.7368.20031130124823000022
1.3.12.2.1107.5.2.4.7368.20031130124917000023
1.3.12.2.1107.5.2.4.7368.20031130125016000024
1.3.12.2.1107.5.2.4.7368.20031130125111000025
1.3.12.2.1107.5.2.4.7368.20031130125215000026
1.3.12.2.1107.5.2.4.7368.20031130125304000027
1.3.12.2.1107.5.2.4.7368.20031130125358000028
1.3.12.2.1107.5.2.4.7368.20031130125453000029
1.3.12.2.1107.5.2.4.7368.20031130125546000030
1.3.12.2.1107.5.2.4.7368.20031130125646000031
1.3.12.2.1107.5.2.4.7368.20031130125741000032
1.3.12.2.1107.5.2.4.7368.20031130125839000033
Now reading series:
1.3.12.2.1107.5.2.4.7368.20031130124720000021
Writing the image as
volume.txt
itk::ExceptionObject (00E9F938)
Location: "Unknown"
File: C:\ITK\src\Code\IO\itkImageFileWriter.txx
Line: 143
Description: itk::ERROR: ImageFileWriter(015164F0): No ImageIO set, or none could be created.
Luis Ibanez <luis.ibanez at kitware.com> wrote:
Hi Michael,
This example reads DICOM files from a directory,
create a volume with them and write the volume
to a file.
If you look at the code, you will find that the
expected arguments are:
1) Directory where your dicom files are
2) Filename of for the output volume
3) DICOM Series to select
Parameter (3) is needed because the directory (1) may
contain several different DICOM series. If you don't
provide any string for argument (3), then the first
series available in the directory is taken by default.
IMPORTANT: DO NOT USE DIRECTORIES WITH SPACES !
There are many places in which filename parsing is
done naively and spaces will be taken as string
terminators.
e.g.: "C:\Documents and Settings" is a particularly
*bad* place for putting your data.
Regards,
Luis
--------------
a a wrote:
> Hi to all,
>
> i was trying out the DicomSeriesReadImageWrite.cxx file, but i'm not
> sure of the program arguments to enter. i went to the project
> settings/Debug in VC++ and in the program arguments, i entered this:
> C:/Documents and Settings/...../Images for argv[1] where Images is the
> folder for the dicom files. However, i'm not sure what to enter for the
> other 2 arguments, can someone show me how? (C:/Documents and
> Settings/...../Images ; ...... ; .............)
>
> What does this DicomSeriesReader do exactly: Load a Dicom Series and
> output them in some other format?
> i have a set of images for the tongue, i suppose each dicom series
> includes images acquired for one slice for a number of time frames, so
> how can i load the images as a volume( all the slices in frame 1 or all
> slices in frame 2...) and stack them up according to their slice position?
>
> Thank you so much for helping
> with Best Regards
> Michael
>
Y! Asia presents Lavalife
- Get clicking with thousands of local singles today!
--0-915173548-1077177101=:9970
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
<DIV>
<DIV>Hi Luis,</DIV>
<DIV> </DIV>
<DIV>i've done what you said but there are some error when running the example, below is the command line and the error. I've built ITK 1.40, but this example was extracted from ITK 1.60(without building 1.60), is that the problem? i've also attached the CMakeCache.txt just in case.</DIV>
<DIV> </DIV>
<DIV>Thanks</DIV>
<DIV>Regards</DIV>
<DIV>Michael</DIV>
<DIV> </DIV>
<DIV>******************************************************************</DIV>
<DIV>volume is the argument for the output file</DIV>
<DIV>******************************************************************</DIV>
<DIV>C:\example1\Debug>DicomSeriesReadImageWrite.exe C:\dicom_images\mdata volume<BR> 1.3.12.2.1107.5.2.4.7368.20031130124720000021</DIV>
<DIV>The directory:</DIV>
<DIV>C:\dicom_images\mdata</DIV>
<DIV>Contains the following DICOM Series:</DIV>
<DIV>1.3.12.2.1107.5.2.4.7368.20031130124720000021<BR>1.3.12.2.1107.5.2.4.7368.20031130124823000022<BR>1.3.12.2.1107.5.2.4.7368.20031130124917000023<BR>1.3.12.2.1107.5.2.4.7368.20031130125016000024<BR>1.3.12.2.1107.5.2.4.7368.20031130125111000025<BR>1.3.12.2.1107.5.2.4.7368.20031130125215000026<BR>1.3.12.2.1107.5.2.4.7368.20031130125304000027<BR>1.3.12.2.1107.5.2.4.7368.20031130125358000028<BR>1.3.12.2.1107.5.2.4.7368.20031130125453000029<BR>1.3.12.2.1107.5.2.4.7368.20031130125546000030<BR>1.3.12.2.1107.5.2.4.7368.20031130125646000031<BR>1.3.12.2.1107.5.2.4.7368.20031130125741000032<BR>1.3.12.2.1107.5.2.4.7368.20031130125839000033</DIV>
<DIV><BR>Now reading series:</DIV>
<DIV>1.3.12.2.1107.5.2.4.7368.20031130124720000021</DIV>
<DIV><BR>Writing the image as</DIV>
<DIV>volume.txt</DIV>
<DIV><BR>itk::ExceptionObject (00E9F938)<BR>Location: "Unknown"<BR>File: C:\ITK\src\Code\IO\itkImageFileWriter.txx<BR>Line: 143<BR>Description: itk::ERROR: ImageFileWriter(015164F0): No ImageIO set, or none could be created.</DIV>
<DIV><BR><BR><B><I>Luis Ibanez <luis.ibanez at kitware.com></I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="BORDER-LEFT: #1010ff 2px solid; MARGIN-LEFT: 5px; PADDING-LEFT: 5px"><BR>Hi Michael,<BR><BR>This example reads DICOM files from a directory,<BR>create a volume with them and write the volume<BR>to a file.<BR><BR>If you look at the code, you will find that the<BR>expected arguments are:<BR><BR>1) Directory where your dicom files are<BR>2) Filename of for the output volume<BR>3) DICOM Series to select<BR><BR>Parameter (3) is needed because the directory (1) may<BR>contain several different DICOM series. If you don't<BR>provide any string for argument (3), then the first<BR>series available in the directory is taken by default.<BR><BR><BR>IMPORTANT: DO NOT USE DIRECTORIES WITH SPACES !<BR><BR>There are many places in which filename parsing is<BR>done naively and spaces will be taken as string<BR>terminators.<BR><BR>e.g.: "C:\Documents and Settings" is a particularly<BR>*bad* place for putting your
data.<BR><BR><BR><BR>Regards,<BR><BR><BR>Luis<BR><BR><BR>--------------<BR>a a wrote:<BR><BR>> Hi to all,<BR>> <BR>> i was trying out the DicomSeriesReadImageWrite.cxx file, but i'm not <BR>> sure of the program arguments to enter. i went to the project <BR>> settings/Debug in VC++ and in the program arguments, i entered this:<BR>> C:/Documents and Settings/...../Images for argv[1] where Images is the <BR>> folder for the dicom files. However, i'm not sure what to enter for the <BR>> other 2 arguments, can someone show me how? (C:/Documents and <BR>> Settings/...../Images ; ...... ; .............)<BR>> <BR>> What does this DicomSeriesReader do exactly: Load a Dicom Series and <BR>> output them in some other format?<BR>> i have a set of images for the tongue, i suppose each dicom series <BR>> includes images acquired for one slice for a number of time frames, so <BR>> how can i load the images as a volume( all the slices in frame 1 or all
<BR>> slices in frame 2...) and stack them up according to their slice position?<BR>> <BR>> Thank you so much for helping<BR>> with Best Regards<BR>> Michael<BR>> <BR><BR><BR></BLOCKQUOTE></DIV><p><img src=http://sg.yimg.com/i/sg/icons/16/perhearts.gif> <a
href="http://sg.rd.yahoo.com/mail/tagline/?http://asia.yahoo.com/lavalife"
target=_blank><B>Y! Asia presents Lavalife</b></a><br><small>- Get clicking with thousands of local singles today!</small>
--0-915173548-1077177101=:9970--
--0-1518771356-1077177101=:9970
Content-Type: text/plain; name="CMakeCache.txt"
Content-Description: CMakeCache.txt
Content-Disposition: inline; filename="CMakeCache.txt"
# This is the CMakeCache file.
# For build in directory: c:/example1
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUI's for the type of VALUE, DO NOT EDIT TYPE!.
# VALUE is the current value for the KEY.
########################
# EXTERNAL cache entries
########################
//Path to a program.
CMAKE_AR:FILEPATH=CMAKE_AR-NOTFOUND
//For backwards compatibility, what version of CMake commands and
// syntax should this version of CMake allow.
CMAKE_BACKWARDS_COMPATIBILITY:STRING=1.8
//C++ compiler
CMAKE_CXX_COMPILER:STRING=cl
//Flags used by the compiler during all build types.
CMAKE_CXX_FLAGS:STRING= /W3 /Zm1000 /GX /GR
//Flags used by the compiler during debug builds.
CMAKE_CXX_FLAGS_DEBUG:STRING=/MDd /Zi /Od /GZ
//Flags used by the compiler during release minsize builds.
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=/MD /O1
//Flags used by the compiler during release builds (/MD /Ob1 /Oi
// /Ot /Oy /Gs will produce slightly less optimized but smaller
// files).
CMAKE_CXX_FLAGS_RELEASE:STRING=/MD /O2
//Flags used by the compiler during Release with Debug Info builds.
//
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=/MD /Zi /O2
//C compiler
CMAKE_C_COMPILER:STRING=cl
//Flags for C compiler.
CMAKE_C_FLAGS:STRING= /W3 /Zm1000
//Flags used by the compiler during debug builds.
CMAKE_C_FLAGS_DEBUG:STRING=/MDd /Zi /Od /GZ
//Flags used by the compiler during release minsize builds.
CMAKE_C_FLAGS_MINSIZEREL:STRING=/MD /O1
//Flags used by the compiler during release builds (/MD /Ob1 /Oi
// /Ot /Oy /Gs will produce slightly less optimized but smaller
// files).
CMAKE_C_FLAGS_RELEASE:STRING=/MD /O2
//Flags used by the compiler during Release with Debug Info builds.
//
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=/MD /Zi /O2
//Flags used by the linker.
CMAKE_EXE_LINKER_FLAGS:STRING=/STACK:10000000 /machine:I386 /INCREMENTAL:YES
//Flags used by the linker during debug builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=/debug /pdbtype:sept
//Flags used by the linker during release minsize builds.
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during release builds.
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during Release with Debug Info builds.
//
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /pdbtype:sept
//Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=/usr/local
//make program
CMAKE_MAKE_PROGRAM:FILEPATH=C:/PROGRA~1/MICROS~3/Common/MSDev98/Bin/msdev.com
//Flags used by the linker during the creation of modules.
CMAKE_MODULE_LINKER_FLAGS:STRING=/STACK:10000000 /machine:I386 /INCREMENTAL:YES
//Flags used by the linker during debug builds.
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=/debug /pdbtype:sept
//Flags used by the linker during release minsize builds.
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during release builds.
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during Release with Debug Info builds.
//
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /pdbtype:sept
//Flags used by the linker during the creation of dll's.
CMAKE_SHARED_LINKER_FLAGS:STRING=/STACK:10000000 /machine:I386 /INCREMENTAL:YES
//Flags used by the linker during debug builds.
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=/debug /pdbtype:sept
//Flags used by the linker during release minsize builds.
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during release builds.
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during Release with Debug Info builds.
//
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /pdbtype:sept
//If set, runtime paths are not added when using shared libraries.
//
CMAKE_SKIP_RPATH:BOOL=NO
//Libraries linked by defalut with all applications.
CMAKE_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
//If this value is on, makefiles will be generated without the
// .SILENT directive, and all commands will be echoed to the console
// during the make. This is useful for debugging only.
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
//Single output directory for building all executables.
EXECUTABLE_OUTPUT_PATH:PATH=
//Value Computed by CMake
IOExamples_BINARY_DIR:STATIC=C:/example1
//Value Computed by CMake
IOExamples_SOURCE_DIR:STATIC=C:/example1
//The directory containing ITKConfig.cmake. This is either the
// root of the build tree, or PREFIX/lib/InsightToolkit for an
// installation.
ITK_DIR:PATH=C:/ITK/build
//Single output directory for building all libraries.
LIBRARY_OUTPUT_PATH:PATH=
########################
# INTERNAL cache entries
########################
//Advanced flag for variable: CMAKE_AR
CMAKE_AR-ADVANCED:INTERNAL=1
//What is the target build tool cmake is generating for.
CMAKE_BUILD_TOOL:INTERNAL=C:/PROGRA~1/MICROS~3/Common/MSDev98/Bin/msdev.com
//This is the directory where this CMakeCahe.txt was created
CMAKE_CACHEFILE_DIR:INTERNAL=c:/example1
//Major version of cmake used to create the current loaded cache
//
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=1
//Minor version of cmake used to create the current loaded cache
//
CMAKE_CACHE_MINOR_VERSION:INTERNAL=8
//Major version of cmake used to create the current loaded cache
//
CMAKE_CACHE_RELEASE_VERSION:INTERNAL=patch 3
//Path to CMake executable.
CMAKE_COMMAND:INTERNAL=C:/Program Files/CMake/bin/cmake.exe
//Advanced flag for variable: CMAKE_CXX_COMPILER
CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
//Result of TRY_COMPILE
CMAKE_CXX_COMPILER_WORKS:INTERNAL=TRUE
//Advanced flag for variable: CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_C_COMPILER
CMAKE_C_COMPILER-ADVANCED:INTERNAL=1
//Result of TRY_COMPILE
CMAKE_C_COMPILER_WORKS:INTERNAL=TRUE
//Advanced flag for variable: CMAKE_C_FLAGS
CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//Path to cache edit program executable.
CMAKE_EDIT_COMMAND:INTERNAL=C:/Program Files/CMake/bin/CMakeSetup.exe
//Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS
CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
//
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
//
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//Name of generator.
CMAKE_GENERATOR:INTERNAL=Visual Studio 6
//Start directory with the top level CMakeLists.txt file for this
// project
CMAKE_HOME_DIRECTORY:INTERNAL=C:/example1
//Advanced flag for variable: CMAKE_INSTALL_PREFIX
CMAKE_INSTALL_PREFIX-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_MAKE_PROGRAM
CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS
CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
//
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
//
CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
//
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//noop for ranlib
CMAKE_RANLIB:INTERNAL=:
//Path to CMake installation.
CMAKE_ROOT:INTERNAL=C:/Program Files/CMake
//Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
//
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
//
CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
//
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_SKIP_RPATH
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_STANDARD_LIBRARIES
CMAKE_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1
//Advanced flag for variable: CMAKE_VERBOSE_MAKEFILE
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
//Path to an executable
CovariantVectorImageExtractComponent_CMAKE_PATH:INTERNAL=C:/example1
//Path to an executable
CovariantVectorImageRead_CMAKE_PATH:INTERNAL=C:/example1
//Path to an executable
CovariantVectorImageWrite_CMAKE_PATH:INTERNAL=C:/example1
//Path to an executable
DicomSeriesReadImageWrite_CMAKE_PATH:INTERNAL=C:/example1
//Path to an executable
ImageReadCastWrite_CMAKE_PATH:INTERNAL=C:/example1
//Path to an executable
ImageReadExportVTK_CMAKE_PATH:INTERNAL=C:/example1
//Path to an executable
ImageReadExtractWrite_CMAKE_PATH:INTERNAL=C:/example1
//Path to an executable
ImageReadImageSeriesWrite_CMAKE_PATH:INTERNAL=C:/example1
//Path to an executable
ImageReadRegionOfInterestWrite_CMAKE_PATH:INTERNAL=C:/example1
//Path to an executable
ImageReadWrite_CMAKE_PATH:INTERNAL=C:/example1
//Path to an executable
ImageSeriesReadWrite_CMAKE_PATH:INTERNAL=C:/example1
//Path to an executable
RGBImageReadWrite_CMAKE_PATH:INTERNAL=C:/example1
//Path to an executable
RGBImageSeriesReadWrite_CMAKE_PATH:INTERNAL=C:/example1
--0-1518771356-1077177101=:9970--