<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>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." .&nbsp; 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&nbsp; modify to do it?<br>4.&gt;&gt;Once you are familiar with the examples, you can run them as:<br>
<br><br>&gt; executable&nbsp; input1 input2&nbsp; output <br>&nbsp;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>Syrine<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><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 &lt;luis.ibanez@kitware.com&gt;<br><b><span style="font-weight: bold;">À :</span></b> Syrine Sahmim &lt;syrine.sahmim@yahoo.fr&gt;<br><b><span style="font-weight: bold;">Cc :</span></b> insight-users@itk.org<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&nbsp;:</span></b> Re: [Insight-users] problem with discrete gaussian filter<br></font><br>Hi Syrine,<br><br>As described in the ITK Software Guide<br><br>&nbsp;&nbsp;&nbsp;&nbsp; <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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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>&nbsp;&nbsp;&nbsp; A) a GNU/Linux shell (in a terminal)&nbsp;&nbsp; or<br>&nbsp;&nbsp;&nbsp; B) a MS-DOS command window on Windows or<br>&nbsp;&nbsp;&nbsp; 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>&gt; executable&nbsp; input1 input2&nbsp; output <br>&nbsp; <br><br>for example, the Median filter example in <br><br>&nbsp; &nbsp; &nbsp;&nbsp; Insight/Examples/Filtering<br><br>will work as:<br><br>&gt; MedianImageFilter&nbsp;&nbsp; BrainProtonDensitySlice.png&nbsp; median.png<br>
<br>You will find ALL the images used for the ITK Software Guide,<br>in the directory:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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>&nbsp;&nbsp;&nbsp;&nbsp; <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>&nbsp;&nbsp;&nbsp;&nbsp; Insight/Examples/IO/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DicomSeriesReadImageWrite2.cxx<br><br><br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Regards,<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Luis<br><br><br><br>
----------------------------------------------------------------------------------------------------------------<br><div class="gmail_quote">On Tue, Jul 28, 2009 at 5:26 AM, Syrine Sahmim <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:syrine.sahmim@yahoo.fr" target="_blank" href="mailto:syrine.sahmim@yahoo.fr">syrine.sahmim@yahoo.fr</a>&gt;</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>
&nbsp;&nbsp;&nbsp; argv[1] = "003F87DA.png";<br>&nbsp;&nbsp;&nbsp; argv[2] = "DA.png";
 <br>&nbsp; /*if( argc &lt; 3 ) <br>&nbsp;&nbsp;&nbsp; { <br>&nbsp;&nbsp;&nbsp; std::cerr &lt;&lt; "Usage: " &lt;&lt; std::endl;<br>&nbsp;&nbsp;&nbsp; std::cerr &lt;&lt; argv[0] &lt;&lt; "&nbsp; inputImageFile&nbsp; outputImageFile&nbsp; variance&nbsp; maxKernelWidth " &lt;&lt; std::endl;<br>
&nbsp;&nbsp;&nbsp; return EXIT_FAILURE;<br>&nbsp;&nbsp;&nbsp; }*/<br><br>&nbsp;<br>&nbsp; typedef&nbsp;&nbsp;&nbsp; float&nbsp;&nbsp;&nbsp; InputPixelType;<br>&nbsp; typedef&nbsp;&nbsp;&nbsp; float&nbsp;&nbsp;&nbsp; OutputPixelType;<br><br>&nbsp; typedef itk::Image&lt; InputPixelType,&nbsp; 3 &gt;&nbsp;&nbsp; InputImageType;<br>&nbsp; typedef itk::Image&lt; OutputPixelType, 3 &gt;&nbsp;&nbsp; OutputImageType;<br>
&nbsp; <br>&nbsp; typedef itk::ImageFileReader&lt; InputImageType &gt;&nbsp; ReaderType;<br><br><br>&nbsp; <br>&nbsp; typedef
 itk::DiscreteGaussianImageFilter&lt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InputImageType, OutputImageType &gt;&nbsp; FilterType;<br><br>&nbsp; FilterType::Pointer filter = FilterType::New();<br>&nbsp; <br>&nbsp; ReaderType::Pointer reader = ReaderType::New();<br>
&nbsp; reader-&gt;SetFileName( argv[1] );<br>&nbsp;<br>&nbsp; filter-&gt;SetInput( reader-&gt;GetOutput() );<br>&nbsp;<br>&nbsp; const double gaussianVariance = atof( argv[3] );<br>&nbsp; const unsigned int maxKernelWidth = atoi( argv[4] );<br><br>&nbsp; filter-&gt;SetVariance( gaussianVariance );<br>
&nbsp; filter-&gt;SetMaximumKernelWidth( maxKernelWidth );<br>&nbsp;<br>&nbsp; <br>&nbsp; filter-&gt;Update();<br>&nbsp; <br>&nbsp; typedef unsigned char WritePixelType;<br>&nbsp; typedef itk::Image&lt; WritePixelType, 2 &gt; WriteImageType;<br>&nbsp; typedef itk::RescaleIntensityImageFilter&lt;
 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OutputImageType, WriteImageType &gt; RescaleFilterType;<br>&nbsp; RescaleFilterType::Pointer rescaler = RescaleFilterType::New();<br><br>&nbsp; rescaler-&gt;SetOutputMinimum(&nbsp;&nbsp; 0 );<br>&nbsp; rescaler-&gt;SetOutputMaximum( 255 );<br>
<br>&nbsp; typedef itk::ImageFileWriter&lt; WriteImageType &gt;&nbsp; WriterType;<br>&nbsp; WriterType::Pointer writer = WriterType::New();<br>&nbsp; writer-&gt;SetFileName( argv[2] );<br>&nbsp;<br>&nbsp; // Software Guide : BeginCodeSnippet<br>&nbsp; rescaler-&gt;SetInput( filter-&gt;GetOutput() );<br>
&nbsp; writer-&gt;SetInput( rescaler-&gt;GetOutput() );<br>&nbsp; writer-&gt;Update();<br>&nbsp; <br>&nbsp; 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><br>



      </body></html>