View Issue Details

IDProjectCategoryView StatusLast Update
0000017Slicer3Command Line Modules (Applications/CLI)public2007-03-27 11:16
ReportermillerjvAssigned Tomillerjv 
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Summary0000017: CommandLineModules do not clean up temporary files if the temporary files are separate header and bulk data files.
Description

CommandLineModules allow the module writer to specify the type of images/geometry file formats to transmit to the module. Slicer will write image/model nodes to the specified format before executing the module. If the file format is a type that produces several files, for instance, a mhd file which produces a small ascii header file and a separate bulk data file, then the CommandLineModule looses track of the bulk data file and does not delete it when the module completes.

Meta, Analyze, Nrrd (header), DICOM can all produce multiple files when they are written to disk. The IO mechansism will properly load these multiple file images/geometries. However, the cleanup code does not know to remove the secondary or dependent files.

We should suggest that module writers only use file formats that use a single file. Or we need to build a mapping from master file to dependent files. Some of these are not too bad, mhd->raw, hdr->img, etc. However, some header files can reference many many dependent files (where each slice in a series results in a separate file).

TagsNo tags attached.

Activities

millerjv

millerjv

2007-01-26 06:47

developer   ~0000023

Bill, I assigned this to you to get your feedback on the issue. You can assign it back to me.

lorensen

lorensen

2007-01-28 03:11

developer   ~0000026

We could just glob for the file name prefix and delete all of the files that match the prefix. The prefix is auto-generated by the application, so this is safe I think.

pieper

pieper

2007-03-27 11:16

administrator   ~0000073

Or, how about making a subdirectory per command line module invokation so that its easy to clean up by deleting the directory.

Issue History

Date Modified Username Field Change
2007-01-26 06:46 millerjv New Issue
2007-01-26 06:46 millerjv Status new => assigned
2007-01-26 06:46 millerjv Assigned To => lorensen
2007-01-26 06:47 millerjv Note Added: 0000023
2007-01-28 03:11 lorensen Note Added: 0000026
2007-03-27 11:16 pieper Note Added: 0000073
2007-03-27 11:16 pieper Assigned To lorensen => millerjv