<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Thank you so much<br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">De :</span></b> Luis Ibanez <luis.ibanez@kitware.com><br><b><span style="font-weight: bold;">À :</span></b> Syrine Sahmim <syrine.sahmim@yahoo.fr><br><b><span style="font-weight: bold;">Envoyé le :</span></b> Mardi, 28 Juillet 2009, 12h08mn 37s<br><b><span style="font-weight: bold;">Objet :</span></b> Re: [Insight-users] Re : problem with discrete gaussian filter<br></font><br><br>Syrine,<br><br><br>If you Google for "MS-DOS Tutorial" you will find hundreds of hits.<br><br>please follow any of those
tutorials:<br><br>For example:<br><br><a rel="nofollow" target="_blank" href="http://www.tnd.com/camosun/elex130/dostutor1.html">http://www.tnd.com/camosun/elex130/dostutor1.html</a><br>
<br><a rel="nofollow" target="_blank" href="http://terpconnect.umd.edu/%7Ensw/ench250/dostutor.htm">http://terpconnect.umd.edu/~nsw/ench250/dostutor.htm</a><br><br><a rel="nofollow" target="_blank" href="http://www.computerhope.com/forum/index.php?topic=25982.0">http://www.computerhope.com/forum/index.php?topic=25982.0</a><br>
<br>or if you prefer YouTube videos:<br><a rel="nofollow" target="_blank" href="http://www.youtube.com/watch?v=e9u6NiBwiPI">http://www.youtube.com/watch?v=e9u6NiBwiPI</a><br><br>you could also do the same from the Visual Studio IDE<br><a rel="nofollow" target="_blank" href="http://www.youtube.com/watch?v=DK96tx23YkU">http://www.youtube.com/watch?v=DK96tx23YkU</a><br>
<br><br><br> Regards<br><br><br> Luis<br><br><br>--------------------------------------------------------------<br><div class="gmail_quote">On Tue, Jul 28, 2009 at 6:54 AM, Syrine Sahmim <span dir="ltr"><<a rel="nofollow" ymailto="mailto:syrine.sahmim@yahoo.fr" target="_blank" href="mailto:syrine.sahmim@yahoo.fr">syrine.sahmim@yahoo.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>Hi Luis,<br>
<br>Thank for the replay.<br>1. My plateform is windows xp<br>2. You have said :"You should familiarize yourself, first, with using a command<br>line interface. Then you will be comfortable running the examples." . Can i find a document that explain to me how can i uses a command line interface? Did you mean that is the " debogue comand" in visual c++?<br>
3. If i try to use the examples with my own images how can i modify to do it?<br>4.>>Once you are familiar with the examples, you can run them as:<br>
<br><br>> executable input1 input2 output <br> I don't understand this part please can you explain more to me.<br>About the itksoftwareguide i have the 2.4 version and i read most of it but in vain i still find many difficulties in programs.<br>
I'm so sorry if i have many questions.thank you really.<br><br>BEST REGARDS<br><font color="#888888">Syrine<br></font></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div class="hm">
<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div class="hm"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">De :</span></b> Luis Ibanez <<a rel="nofollow" ymailto="mailto:luis.ibanez@kitware.com" target="_blank" href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>><br>
<b><span style="font-weight: bold;">À :</span></b> Syrine Sahmim <<a rel="nofollow" ymailto="mailto:syrine.sahmim@yahoo.fr" target="_blank" href="mailto:syrine.sahmim@yahoo.fr">syrine.sahmim@yahoo.fr</a>><br><b><span style="font-weight: bold;">Cc :</span></b> <a rel="nofollow" ymailto="mailto:insight-users@itk.org" target="_blank" href="mailto:insight-users@itk.org">insight-users@itk.org</a><br>
<b><span style="font-weight: bold;">Envoyé le :</span></b> Mardi, 28 Juillet 2009, 11h35mn 05s<br><b><span style="font-weight: bold;">Objet :</span></b> Re: [Insight-users] problem with discrete gaussian filter<br></font></div>
<div><div></div><div class="h5"><br>Hi Syrine,<br><br>As described in the ITK Software Guide<br><br> <a rel="nofollow" target="_blank" href="http://www.itk.org/ItkSoftwareGuide.pdf">http://www.itk.org/ItkSoftwareGuide.pdf</a><br>
<br>all the examples in the directory:<br><br> Insight/Examples<br>
<br>are intended to be run as command line executables.<br><br>This means that you must run them from:<br><br> A) a GNU/Linux shell (in a terminal) or<br> B) a MS-DOS command window on Windows or<br> C) a Visual Studio command prompt window<br>
<br><br>What is your platform ?<br>(Windows?, Linux?, Mac? other ?).<br><br>You should familiarize yourself, first, with using a command<br>line interface. Then you will be comfortable running the examples.<br><br><br>Once you are familiar with the examples, you can run them as:<br>
<br><br>> executable input1 input2 output <br> <br><br>for example, the Median filter example in <br><br> Insight/Examples/Filtering<br><br>will work as:<br><br>> MedianImageFilter BrainProtonDensitySlice.png median.png<br>
<br>You will find ALL the images used for the ITK Software Guide,<br>in the directory:<br><br> Insight/Testing/Data<br><br>(including the BrainProtonDensitySlice.png mentioned above).<br><br><br><br>---<br><br>About your process for reading a DICOM image, the problem<br>
is that you are using the ImageFileReader, while you should be<br>using the ImageSeriesReader.<br><br><br>In your current code, you are only reading one slice of the<br>DICOM series.<br><br><br>Please read the ITK Software Guide<br>
<br> <a rel="nofollow" target="_blank" href="http://www.itk.org/ItkSoftwareGuide.pdf">http://www.itk.org/ItkSoftwareGuide.pdf</a><br><br>in particular the chapter "Reading and Writing Images", it has<br>detailed explanations on how to read a series of DICOM images<br>
from a directory.<br><br>You will find useful to look at the Example:<br><br> Insight/Examples/IO/<br> DicomSeriesReadImageWrite2.cxx<br><br><br><br><br> Regards,<br><br><br> Luis<br><br><br><br>
----------------------------------------------------------------------------------------------------------------<br><div class="gmail_quote">On Tue, Jul 28, 2009 at 5:26 AM, Syrine Sahmim <span dir="ltr"><<a rel="nofollow" ymailto="mailto:syrine.sahmim@yahoo.fr" target="_blank" href="mailto:syrine.sahmim@yahoo.fr">syrine.sahmim@yahoo.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div>Hello every body,<br>Yesterday i sent an email to the group to know what is the problem with my code and i did not receive answer.<br>I want to understand some things at the begining:<br>1. when i try the examples programs, i must give to the program the images as input. the problem is that i can't do that , i don't know how and where i must gives the input image and the out put one. if someone can explain more this issue to me.<br>
2. i send again my previous program to try to find errors.<br>I try to apply the discrete gaussian filter on a 3D dicom image. So i
tried the code below. there's no errors on building step but the
problem is after debugging. i don't have result.so i want to know
where's the error or even i must do or add some codes to succeed
execution.<br>the code is:<br>#if defined(_MSC_VER)<br>#pragma warning ( disable : 4786 )<br>#endif<br><br>#ifdef __BORLANDC__<br>#define ITK_LEAN_AND_MEAN<br>#endif<br><br>#include "itkImage.h"<br>#include "itkImageFileReader.h"<br>
#include "itkImageFileWriter.h"<br>#include "itkRescaleIntensityImageFilter.h"<br><br><br>#include "itkDiscreteGaussianImageFilter.h"<br><br>int main( int argc, char * argv[] )<br>{argc = 2;<br>
argv[1] = "003F87DA.png";<br> argv[2] = "DA.png";
<br> /*if( argc < 3 ) <br> { <br> std::cerr << "Usage: " << std::endl;<br> std::cerr << argv[0] << " inputImageFile outputImageFile variance maxKernelWidth " << std::endl;<br>
return EXIT_FAILURE;<br> }*/<br><br> <br> typedef float InputPixelType;<br> typedef float OutputPixelType;<br><br> typedef itk::Image< InputPixelType, 3 > InputImageType;<br> typedef itk::Image< OutputPixelType, 3 > OutputImageType;<br>
<br> typedef itk::ImageFileReader< InputImageType > ReaderType;<br><br><br> <br> typedef
itk::DiscreteGaussianImageFilter<<br> InputImageType, OutputImageType > FilterType;<br><br> FilterType::Pointer filter = FilterType::New();<br> <br> ReaderType::Pointer reader = ReaderType::New();<br>
reader->SetFileName( argv[1] );<br> <br> filter->SetInput( reader->GetOutput() );<br> <br> const double gaussianVariance = atof( argv[3] );<br> const unsigned int maxKernelWidth = atoi( argv[4] );<br><br> filter->SetVariance( gaussianVariance );<br>
filter->SetMaximumKernelWidth( maxKernelWidth );<br> <br> <br> filter->Update();<br> <br> typedef unsigned char WritePixelType;<br> typedef itk::Image< WritePixelType, 2 > WriteImageType;<br> typedef itk::RescaleIntensityImageFilter<
<br> OutputImageType, WriteImageType > RescaleFilterType;<br> RescaleFilterType::Pointer rescaler = RescaleFilterType::New();<br><br> rescaler->SetOutputMinimum( 0 );<br> rescaler->SetOutputMaximum( 255 );<br>
<br> typedef itk::ImageFileWriter< WriteImageType > WriterType;<br> WriterType::Pointer writer = WriterType::New();<br> writer->SetFileName( argv[2] );<br> <br> // Software Guide : BeginCodeSnippet<br> rescaler->SetInput( filter->GetOutput() );<br>
writer->SetInput( rescaler->GetOutput() );<br> writer->Update();<br> <br> return EXIT_SUCCESS;<br>}<br><br>BEST REGARDS<br><br></div></div><br>
</div><br>_____________________________________<br>
Powered by <a rel="nofollow" target="_blank" href="http://www.kitware.com">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a rel="nofollow" target="_blank" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at: <a rel="nofollow" target="_blank" href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a rel="nofollow" target="_blank" href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br>
</div></div></div></div></div><br>
</div><br>_____________________________________<br>
Powered by <a rel="nofollow" target="_blank" href="http://www.kitware.com">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a rel="nofollow" target="_blank" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at: <a rel="nofollow" target="_blank" href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a rel="nofollow" target="_blank" href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br>
</div></div></div><br>
</body></html>