Skip to content

Commit

Permalink
Split into SCU and SCP
Browse files Browse the repository at this point in the history
  • Loading branch information
malaterre committed Jul 29, 2010
1 parent 6dae4b6 commit 7fe13ab
Show file tree
Hide file tree
Showing 12 changed files with 228 additions and 28 deletions.
17 changes: 1 addition & 16 deletions itkDICOMBase.h
Expand Up @@ -63,15 +63,6 @@ class ITK_EXPORT DICOMBase : public LightProcessObject
itkSetStringMacro(CalledAETitle);
itkGetStringMacro(CalledAETitle);

/** proposed transmission transfer syntaxes: */
typedef enum {
ImplicitVRLittleEndian = 1,
ExplicitVRLittleEndian = 2,
ExplicitVRBigEndian = 4,
} TransmissionTransferSyntaxType;
itkSetEnumMacro(TransmissionTransferSyntax, TransmissionTransferSyntaxType);
itkGetEnumMacro(TransmissionTransferSyntax, TransmissionTransferSyntaxType);

/** other network options: */

/// timeout for connection requests.
Expand All @@ -87,32 +78,26 @@ class ITK_EXPORT DICOMBase : public LightProcessObject
itkSetMacro(DIMSETimeout, unsigned int);
itkGetMacro(DIMSETimeout, unsigned int);

/// set max receive pdu to n bytes
/// set max receive pdu to n bytes
itkSetMacro(MaxPDU, unsigned int);
itkGetMacro(MaxPDU, unsigned int);

/// repeat n times
itkSetMacro(NumberOfRepeat, unsigned int);
itkGetMacro(NumberOfRepeat, unsigned int);

/// cancel after n responses
itkSetMacro(CancelAfterNResponses, unsigned int);
itkGetMacro(CancelAfterNResponses, unsigned int);

private:
// FIXME: an abstract class should not have data member:
std::string m_PeerHostname;
unsigned int m_PortNumber;
QueryInformationModelType m_QueryInformationModel;
std::string m_AETitle;
std::string m_CalledAETitle;
TransmissionTransferSyntaxType m_TransmissionTransferSyntax;
unsigned int m_Timeout;
unsigned int m_ACSETimeout;
unsigned int m_DIMSETimeout;
unsigned int m_MaxPDU;
unsigned int m_NumberOfRepeat;
unsigned int m_CancelAfterNResponses;

private:
DICOMBase(const Self&); //purposely not implemented
Expand Down
18 changes: 16 additions & 2 deletions itkDICOMEchoSCU.h
Expand Up @@ -17,7 +17,7 @@
#ifndef __itkDICOMEchoSCU_h
#define __itkDICOMEchoSCU_h

#include "itkDICOMBase.h"
#include "itkDICOMSCU.h"

#include <string>

Expand All @@ -27,7 +27,7 @@ namespace itk
/** \class DICOMEchoSCU
* \brief
*/
class ITK_EXPORT DICOMEchoSCU : public DICOMBase
class ITK_EXPORT DICOMEchoSCU : public DICOMSCU
{
public:
/** Standard class typedefs. */
Expand All @@ -38,6 +38,20 @@ class ITK_EXPORT DICOMEchoSCU : public DICOMBase
/** Run-time type information (and related methods). */
itkTypeMacro(DICOMEchoSCU, Superclass);

/** association negotiation debugging: */

/** propose n transfer syntaxes */
itkSetMacro(ProposeTransferSyntax, unsigned int);
itkGetMacro(ProposeTransferSyntax, unsigned int);

/** propose n presentation contexts */
itkSetMacro(ProposePresentationContexts, unsigned int);
itkGetMacro(ProposePresentationContexts, unsigned int);

private:
unsigned int m_ProposeTransferSyntax;
unsigned int m_ProposePresentationContexts;

private:
DICOMEchoSCU(const Self&); //purposely not implemented
void operator=(const Self&); //purposely not implemented
Expand Down
11 changes: 9 additions & 2 deletions itkDICOMFindSCU.h
Expand Up @@ -17,7 +17,7 @@
#ifndef __itkDICOMFindSCU_h
#define __itkDICOMFindSCU_h

#include "itkDICOMBase.h"
#include "itkDICOMSCU.h"

#include <string>

Expand All @@ -27,7 +27,7 @@ namespace itk
/** \class DICOMFindSCU
* \brief
*/
class ITK_EXPORT DICOMFindSCU : public DICOMBase
class ITK_EXPORT DICOMFindSCU : public DICOMSCU
{
public:
/** Standard class typedefs. */
Expand All @@ -38,6 +38,13 @@ class ITK_EXPORT DICOMFindSCU : public DICOMBase
/** Run-time type information (and related methods). */
itkTypeMacro(DICOMFindSCU, Superclass);

/** cancel after n responses */
itkSetMacro(CancelAfterNResponses, unsigned int);
itkGetMacro(CancelAfterNResponses, unsigned int);

private:
unsigned int m_CancelAfterNResponses;

private:
DICOMFindSCU(const Self&); //purposely not implemented
void operator=(const Self&); //purposely not implemented
Expand Down
6 changes: 4 additions & 2 deletions itkDICOMMoveSCU.h
Expand Up @@ -17,7 +17,7 @@
#ifndef __itkDICOMMoveSCU_h
#define __itkDICOMMoveSCU_h

#include "itkDICOMBase.h"
#include "itkDICOMSCU.h"

#include <string>

Expand All @@ -26,8 +26,10 @@ namespace itk

/** \class DICOMMoveSCU
* \brief
*
* Do we need move ?
*/
class ITK_EXPORT DICOMMoveSCU : public DICOMBase
class ITK_EXPORT DICOMMoveSCU : public DICOMSCU
{
public:
/** Standard class typedefs. */
Expand Down
22 changes: 22 additions & 0 deletions itkDICOMSCP.cxx
@@ -0,0 +1,22 @@
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile: itkDICOMBase.h,v $
Language: C++
Date: $Date: 2009-11-29 15:51:11 $
Version: $Revision: 1.1 $
Copyright (c) Insight Software Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "itkDICOMBase.h"

namespace itk
{

} // end namespace itk
48 changes: 48 additions & 0 deletions itkDICOMSCP.h
@@ -0,0 +1,48 @@
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile: itkDICOMBase.h,v $
Language: C++
Date: $Date: 2009-11-29 15:51:11 $
Version: $Revision: 1.1 $
Copyright (c) Insight Software Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __itkDICOMSCP_h
#define __itkDICOMSCP_h

#include "itkDICOMBase.h"

#include <string>

namespace itk
{

/** \class DICOMBase
* \brief Abstract superclass defines image DICOM interface.
*/
class ITK_EXPORT DICOMSCP : public DICOMBase
{
public:
/** Standard class typedefs. */
typedef DICOMBase Self;
typedef LightProcessObject Superclass;
typedef SmartPointer<Self> Pointer;

/** Run-time type information (and related methods). */
itkTypeMacro(DICOMBase, Superclass);

private:
DICOMSCP(const Self&); //purposely not implemented
void operator=(const Self&); //purposely not implemented
};

} // end namespace itk

#endif // __itkDICOMBase_h
22 changes: 22 additions & 0 deletions itkDICOMSCU.cxx
@@ -0,0 +1,22 @@
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile: itkDICOMBase.h,v $
Language: C++
Date: $Date: 2009-11-29 15:51:11 $
Version: $Revision: 1.1 $
Copyright (c) Insight Software Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "itkDICOMBase.h"

namespace itk
{

} // end namespace itk
71 changes: 71 additions & 0 deletions itkDICOMSCU.h
@@ -0,0 +1,71 @@
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile: itkDICOMBase.h,v $
Language: C++
Date: $Date: 2009-11-29 15:51:11 $
Version: $Revision: 1.1 $
Copyright (c) Insight Software Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __itkDICOMSCU_h
#define __itkDICOMSCU_h

#include "itkDICOMBase.h"

#include <string>

namespace itk
{

/** \class DICOMBase
* \brief Abstract superclass defines image DICOM interface.
*/
class ITK_EXPORT DICOMSCU : public DICOMBase
{
public:
/** Standard class typedefs. */
typedef DICOMSCU Self;
typedef DICOMBase Superclass;
typedef SmartPointer<Self> Pointer;

/** Run-time type information (and related methods). */
itkTypeMacro(DICOMSCU, Superclass);

/** proposed transmission transfer syntaxes: */
typedef enum {
ImplicitVRLittleEndian = 1, // Implicit VR Little Endian: Default Transfer Syntax for DICOM
ExplicitVRLittleEndian = 2, // Explicit VR Little Endian
DeflatedExplicitVRLittleEndian = 4, // Deflated Explicit VR Little Endian
ExplicitVRBigEndian = 8, // Explicit VR Big Endian
JPEGBaselineProcess1 = 16, // JPEG Baseline (Process 1): Default Transfer Syntax for Lossy JPEG 8 Bit Image Compression
JPEGExtendedProcess24 = 32, // JPEG Extended (Process 2 & 4): Default Transfer Syntax for Lossy JPEG 12 Bit Image Compression (Process 4 only)
JPEGLosslessNonHierarchicalProcess14 = 64, // JPEG Lossless, Non-Hierarchical (Process 14)
JPEGLosslessNonHierarchicalFirstOrderPrediction = 128, // JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1]): Default Transfer Syntax for Lossless JPEG Image Compression
JPEGLSLosslessImageCompression = 256, // JPEG-LS Lossless Image Compression
JPEGLSLossyNearLosslessImageCompression = 512, // JPEG-LS Lossy (Near-Lossless) Image Compression
JPEG2000ImageCompressionLosslessOnly = 1024, // JPEG 2000 Image Compression (Lossless Only)
JPEG2000ImageCompression = 2048, // JPEG 2000 Image Compression
MPEG2MainProfileMainLevel = 4096, // MPEG2 Main Profile @ Main Level
RLELossless = 8192, // RLE Lossless
} TransmissionTransferSyntaxType;
itkSetEnumMacro(ProposedTransmissionTransferSyntax, TransmissionTransferSyntaxType);
itkGetEnumMacro(ProposedTransmissionTransferSyntax, TransmissionTransferSyntaxType);

private:
TransmissionTransferSyntaxType m_ProposedTransmissionTransferSyntax;

private:
DICOMSCU(const Self&); //purposely not implemented
void operator=(const Self&); //purposely not implemented
};

} // end namespace itk

#endif // __itkDICOMBase_h
2 changes: 1 addition & 1 deletion itkDICOMStoreSCP.cxx
Expand Up @@ -14,7 +14,7 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "itkDICOMStoreSCU.h"
#include "itkDICOMStoreSCP.h"

namespace itk
{
Expand Down
4 changes: 2 additions & 2 deletions itkDICOMStoreSCP.h
Expand Up @@ -17,7 +17,7 @@
#ifndef __itkDICOMStoreSCP_h
#define __itkDICOMStoreSCP_h

#include "itkDICOMBase.h"
#include "itkDICOMSCP.h"

#include <string>

Expand All @@ -27,7 +27,7 @@ namespace itk
/** \class DICOMStoreSCP
* \brief
*/
class ITK_EXPORT DICOMStoreSCP : public DICOMBase
class ITK_EXPORT DICOMStoreSCP : public DICOMSCP
{
public:
/** Standard class typedefs. */
Expand Down
12 changes: 11 additions & 1 deletion itkDICOMStoreSCU.cxx
Expand Up @@ -14,9 +14,19 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "itkDICOMEchoSCU.h"
#include "itkDICOMStoreSCU.h"

namespace itk
{

const DICOMStoreSCU::FileNamesContainer & DICOMStoreSCU::GetFileNames() const
{
return m_FileNames;
}

void DICOMStoreSCU::SetFileNames (const FileNamesContainer &names)
{
m_FileNames = names;
}

} // end namespace itk

0 comments on commit 7fe13ab

Please sign in to comment.