[Insight-users] Re: Re: GDMCSeriesFileNames and 3d in VTK after
segmentation
mariusz_smch at poczta.fm
mariusz_smch at poczta.fm
Fri Oct 21 08:00:30 EDT 2005
Thank's for tip.
I know I could do it by changing every filname string provide to writer,
but I would have to do it "by hand" thanks to:
'GDCMSeriesFileNames'
when I give to this class dirname where DICOM series are and pick any
series, and provide to 'GDCMSeriesFileNames' it will give me path to files
and I can this provide to ImageSeriesReader:
reader->SetFileNames();
And, in big short, I have all whot I neer read. Some series I have hane
318 -files so It woul take a while to change it,it is not whot I would
like to do. I would rather do it by some ITK class whoes take care that
kind of thinks. I thoud there is some class in ITK that do it
automaticly.
Maybe I do something wrong in my code. I thoud, after reading, to use once
again 'GDCMSeriesFileNames' to provide Output filenames to writer but don't
know how conect bouth 'GDCMSeriesFileNames' form reader part and this form
writer part.
In GDCMSeriesFileNames I can provide 'SetInputDir' and 'SetOutputDir'
separetly but to choos write series I have to Provite: 'SetDirectory' whos
cover Input and Output Dir, so when I use 'SetDirectory' I don't have
separet path filenames to reader and writer.
Can anyone know how to do this?
And I have question: after segmentation when I convert form ITK to VTK -to
display 3D image, whot kind od data I should use in VTK part of pipeline (I
don't know jet: mesh or some others...).
Regards
Mariusz Śmiech
I don't know anything yet about ITK and VTK stuff but your question, I am
sure, has nothing to do with these packages.
After reading the files, you have the files names stored somewhere. Of
course if you use the names as they are then the original files will be
overwritten. Obviously your file names are stored as strings (array of
characters otherwise) so manupilate the strings to change path and
filenames as u wish.
Let me show u simple example:
Supoose you read from a file C:\dir1\dir2\dir3\fileName.dic
Then you may want to write it toC:\dir1\dir2\dir4\newFileName.dic
So here is how you could do it:
***First make sure the name "C:\dir1\dir2\dir3\fileName.dic" is stored in
a string, lets call it oldFile. Then,
newFile = string(oldFile, 0, oldFile.rfind('\', oldFile.length()) 1)
string("newFileName.dic");
will do your job.
For more information, I suggest you to read C strings.
--
Regards,
Yonas
http://isiosf.isi.it/~yonas
Hi all
I've read DICOM image series (I have several in one directory) with:
ImageSeriesReader
I get filename from:
GDCMSeriesFileNames
After I choose series I try to write this as DICOM with:
ImageSeriesWriter
and don't know how show wtiter write directory, bycouse if I take
filename
form: GDCMSeriesFileNames z get the same dir path and file name so he
write
in the same dir whith was used to read DICOM data.
Whow I want to do is:
1. read DICOM File
2. put them to 3D image
3. Segment image
4. could wtire segmented image as 2D DICOM image
5. could wtire segmented image as 3D image
6. anfer segmentatnion thensfer image form ITK to VTK
7. afres segmentation display 3D image (I will use VTK-an soon as I
reath
this point)
8. have posibylity to move camera in 3D image
Can anyone give me some help, basic information about the thin I wrote at
the begining and point 6,7,8 -any clue will be good.
Have a Nice day
Mariusz Śmiech
Poland
----------------------------------------------------------------------
INTERIA.PL | Kliknij po wiecej >>> http://link.interia.pl/f18c1
More information about the Insight-users
mailing list