]> Creatis software - creaImageIO.git/blobdiff - bbtk_Transform3Ddicom_PKG/bbs/boxes/bbSubVolDicom.bbs
#3326 bbtk_Transform3Ddicom_PKG
[creaImageIO.git] / bbtk_Transform3Ddicom_PKG / bbs / boxes / bbSubVolDicom.bbs
diff --git a/bbtk_Transform3Ddicom_PKG/bbs/boxes/bbSubVolDicom.bbs b/bbtk_Transform3Ddicom_PKG/bbs/boxes/bbSubVolDicom.bbs
new file mode 100644 (file)
index 0000000..d460208
--- /dev/null
@@ -0,0 +1,50 @@
+
+
+load Transform3Ddicom
+load vtk
+load std
+load itk
+load itkvtk
+
+
+define SubVolumeDicom Transform3Ddicom
+
+description "Extract sub volume with dicom info"
+author "davila.eduardo@creatis.univ-lyon1.fr"
+category "complex box, 3D object creator"
+
+
+
+new MagicBox magicboxIPP 
+new MagicBox magicboxIOP
+new MagicBox magicboxPixelSpacing 
+new MagicBox magicboxIndex
+
+new NewDicomImaPosPat ndipp
+  connect magicboxIndex.Out         ndipp.Point
+  connect magicboxIPP.Out           ndipp.IPP
+  connect magicboxIOP.Out           ndipp.IOP
+  connect magicboxPixelSpacing.Out  ndipp.PixelSpacing 
+
+
+new ImageRegion imageregion
+  connect magicboxIndex.Out  imageregion.Index
+
+new ExtractImageFilter extractimagefilter
+  connect imageregion.Out  extractimagefilter.Region
+
+
+// ----Require inputs----
+ input IPP            magicboxIPP.In            "Image Position Patient"
+ input OPP            magicboxIOP.In            "Image Orienation Patient"
+ input PixelSpacing   magicboxPixelSpacing.In   "Spacing of the image"
+ input Index          magicboxIndex.In          "Index of the subvolume"
+ input Size           imageregion.Size          "Size subvolume"
+ input In             extractimagefilter.In     "Image"
+
+
+// ----output----
+ output Out            extractimagefilter.Out        "sub image"
+
+endefine
+