int main(int argc, char*argv[])
{//Verify input arguments
if ( argc != 2)
{
std::cout<< "Usage:" << argv[0]<< "FolderName" <<:endl>
}
std::string folder = argv[1];//Read all the DICOM files in the specified directory.
vtkSmartPointer reader =vtkSmartPointer::New();
reader->SetDirectoryName(folder.c_str());
reader->Update();//Visualize
vtkSmartPointer imageViewer =vtkSmartPointer::New();
imageViewer->SetInputConnection(reader->GetOutputPort());//slice status message
vtkSmartPointer sliceTextProp = vtkSmartPointer::New();
sliceTextProp->SetFontFamilyToCourier();
sliceTextProp->SetFontSize(20);
sliceTextProp->SetVerticalJustificationToBottom();
sliceTextProp->SetJustificationToLeft();
vtkSmartPointer sliceTextM