16.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 5992406e authored by Cristina Precup's avatar Cristina Precup
Browse files

Use ItkReader instead of GenericImageReader. Currently, this is more suitable...

Use ItkReader instead of GenericImageReader. Currently, this is more suitable for the SegmentationDemo and RegistrationDemo because of the supported image formats
parent dda7efb7
...@@ -61,12 +61,13 @@ namespace campvis { ...@@ -61,12 +61,13 @@ namespace campvis {
_ve.p_outputImage.setValue("result"); _ve.p_outputImage.setValue("result");
_renderTargetID.setValue("result"); _renderTargetID.setValue("result");
//_imageReader.setURL(CAMPVIS_SOURCE_DIR "/modules/vis/sampledata/smallHeart.mhd"); // These 2 properties are not needed in the segmentation demo
//_imageReader.setURL(CAMPVIS_SOURCE_DIR "/../misc/mha_loader_CAMPVis_volumes/prostate_phantom_US/prostate_phantom_fcal_volume_uncompressed.mhd"); _imageReader.removeProperty(_imageReader.p_imageSeries);
_imageReader.setURL(CAMPVIS_SOURCE_DIR "/../misc/mha_loader_CAMPVis_volumes/prostate_phantom_US/prostate_phantom_fcal_volume_uncompressed.mha"); _imageReader.removeProperty(_imageReader.p_lastUrl);
_imageReader.setTargetImageId("reader.output");
_imageReader.setTargetImageIdSharedProperty(&_ve.p_inputVolume);
_imageReader.p_url.setValue(CAMPVIS_SOURCE_DIR "/modules/vis/sampledata/prostatePhantom.mha");
_imageReader.p_targetImageID.setValue("reader.output");
_imageReader.p_targetImageID.addSharedProperty(&_ve.p_inputVolume);
Geometry1DTransferFunction* dvrTF = new Geometry1DTransferFunction(128, tgt::vec2(0.f, .05f)); Geometry1DTransferFunction* dvrTF = new Geometry1DTransferFunction(128, tgt::vec2(0.f, .05f));
dvrTF->addGeometry(TFGeometry1D::createQuad(tgt::vec2(.4f, .5f), tgt::col4(32, 192, 0, 128), tgt::col4(32, 192, 0, 128))); dvrTF->addGeometry(TFGeometry1D::createQuad(tgt::vec2(.4f, .5f), tgt::col4(32, 192, 0, 128), tgt::col4(32, 192, 0, 128)));
......
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
#include "core/pipeline/autoevaluationpipeline.h" #include "core/pipeline/autoevaluationpipeline.h"
#include "modules/base/processors/lightsourceprovider.h" #include "modules/base/processors/lightsourceprovider.h"
#include "modules/io/processors/genericimagereader.h"
#include "modules/vis/processors/volumeexplorer.h" #include "modules/vis/processors/volumeexplorer.h"
#include "modules/itk/processors/itkreader.h"
#include "modules/itk/processors/itkimagefilter.h" #include "modules/itk/processors/itkimagefilter.h"
#include "modules/itk/processors/itkregistration.h" #include "modules/itk/processors/itkregistration.h"
...@@ -58,7 +58,7 @@ namespace campvis { ...@@ -58,7 +58,7 @@ namespace campvis {
protected: protected:
LightSourceProvider _lsp; LightSourceProvider _lsp;
GenericImageReader _imageReader; ItkReader _imageReader;
VolumeExplorer _ve; VolumeExplorer _ve;
ItkRegistration _itkRegistration; ItkRegistration _itkRegistration;
}; };
......
...@@ -61,11 +61,13 @@ namespace campvis { ...@@ -61,11 +61,13 @@ namespace campvis {
_itkSegmentation.p_outputImage.setValue("result"); _itkSegmentation.p_outputImage.setValue("result");
_renderTargetID.setValue("result"); _renderTargetID.setValue("result");
//_imageReader.setURL(CAMPVIS_SOURCE_DIR "/modules/vis/sampledata/smallHeart.mhd"); // These 2 properties are not needed in the segmentation demo
_imageReader.setURL(CAMPVIS_SOURCE_DIR "/../misc/mha_loader_CAMPVis_volumes/prostate_phantom_US/prostate_phantom_fcal_volume_uncompressed.mha"); _imageReader.removeProperty(_imageReader.p_imageSeries);
_imageReader.setTargetImageId("reader.output"); _imageReader.removeProperty(_imageReader.p_lastUrl);
_imageReader.setTargetImageIdSharedProperty(&_itkSegmentation.p_inputVolume);
_imageReader.p_url.setValue(CAMPVIS_SOURCE_DIR "/modules/vis/sampledata/prostatePhantom.mha");
_imageReader.p_targetImageID.setValue("reader.output");
_imageReader.p_targetImageID.addSharedProperty(&_itkSegmentation.p_inputVolume);
Geometry1DTransferFunction* dvrTF = new Geometry1DTransferFunction(128, tgt::vec2(0.f, .05f)); Geometry1DTransferFunction* dvrTF = new Geometry1DTransferFunction(128, tgt::vec2(0.f, .05f));
dvrTF->addGeometry(TFGeometry1D::createQuad(tgt::vec2(.4f, .5f), tgt::col4(32, 192, 0, 128), tgt::col4(32, 192, 0, 128))); dvrTF->addGeometry(TFGeometry1D::createQuad(tgt::vec2(.4f, .5f), tgt::col4(32, 192, 0, 128), tgt::col4(32, 192, 0, 128)));
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "core/pipeline/autoevaluationpipeline.h" #include "core/pipeline/autoevaluationpipeline.h"
#include "modules/base/processors/lightsourceprovider.h" #include "modules/base/processors/lightsourceprovider.h"
#include "modules/io/processors/genericimagereader.h" #include "modules/itk/processors/itkreader.h"
#include "modules/itk/processors/itkimagefilter.h" #include "modules/itk/processors/itkimagefilter.h"
#include "modules/itk/processors/itksegmentation.h" #include "modules/itk/processors/itksegmentation.h"
...@@ -57,7 +57,7 @@ namespace campvis { ...@@ -57,7 +57,7 @@ namespace campvis {
protected: protected:
LightSourceProvider _lsp; LightSourceProvider _lsp;
GenericImageReader _imageReader; ItkReader _imageReader;
ItkImageFilter _itkFilter; ItkImageFilter _itkFilter;
ItkSegmentation _itkSegmentation; ItkSegmentation _itkSegmentation;
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment