[Insight-users] file writer/reader problem

smythek at u.washington.edu smythek at u.washington.edu
Thu May 18 11:33:33 EDT 2006




On Thu, 18 May 2006 smythek at u.washington.edu wrote:

>
>
>
> On Thu, 18 May 2006, Kevin  H. Hobbs wrote:
>
>> On Wed, 2006-05-17 at 19:37 -0700, k s wrote:
>>> Hello,
>>> 
>>> I am having trouble overwriting a file that I've already written out to. 
>>> It
>>> gives an "unable to open file" error when I try something like the
>>> pseudocode below:
>>> 
>>> I have a writerType Pointer writer,
>>> 	 a readerType reader, and
>>> 	 two ImageType InputFile, Outputfile.
>>> 
>>> After
>>> 
>>> reader->SetFileName(InputFile);
>> 
>> I think the reader->SetFileName wants a char * file_name_string not an
>> ImageType. Something like reader->SetFileName( "in_file.png" ); or
>> reader->SetFileName( argv[1] ); Are you getting any real images out with
>> same names?
>
> Yes, the Outputfile is written to and read from, but I can't write to it again. 
> And it looks OK.
I need to be more specific.  These filters are PasteFilterType s, and while I can write out a paste output once, if I try to write out another paste output to the same file, I get "TIFFOpen: Outputfile.tif: Cannot open."



More information about the Insight-users mailing list